Posts

Showing posts from May, 2013

windows - Beginning programming: Simple/Quick work log application -

I would like to create a script with a simple task log program / very basic function. Basically when I run it, I get a signal with an input window. When I type input, it prints it in a .txt file with the current date and time. Input: & lt; Text here & gt; And the output will look something like this in a .txt file. & lt; HH: MM: SS YYYY: MM: DD & gt; | & Lt; Text & gt; Is the programming language "the easiest" for such a program? h Well, well I think it would be difficult to answer your question on the head. About to ask yourself if you know what language if you do not know, go ahead and get the problem that you are trying to solve each step at a time, which is comfortable with you. Do you want a program that uses strict command line? Or do you want a program with GUI? Being said, I preferably would recommend Java because I think the syntax is more obvious to me, but no recommendation, language X because they know a few simple ...

c# - LINQ to SQL DataContext "String must be exactly one character long." -

मैं एक संग्रहीत कार्यविधि को एक वेब सेवा कनेक्शन में उपयोग कर रहा हूं LINQ से SQL द्वारा जब मैं मैन्युअल रूप से मेरी संग्रहीत कार्यविधि निष्पादित करता हूं, तो मैं देखता हूं कि यह मेरे पास कॉलम वापस करता है, लेकिन जब मैं अपने वेब सेवा को LINQ से SQL का उपयोग करने की कोशिश करता / करता हूं> मुझे "code" मिलता है संग्रहीत प्रक्रिया चार मापदंडों की उम्मीद है कोड>: char (12) , varchar (3) , int , varchar (3) आउटपुट जब मैं करता हूँ: exec spName '123456789012', '123', '1', '' मुझे सही कॉलम मिल गया (एसक्यूएल में) सर्वर 2012), हालांकि जब मैं इसे अपने वेब सेवा से निम्न कोड से कॉल करता हूं: string str1 = "123456789012"; स्ट्रिंग str2 = "123"; int? Int1 = 1; स्ट्रिंग str3 = String.Empty; SpNameResult परिणाम = context.spName (str1, str2, int1, रेफरी स्ट्र्ज़)। फर्स्टऑर डीफॉल्ट & lt; spNameResult & gt; (); यह स्ट्रिंग की ज़रूरत की त्रुटि को एक अक्षर के बराबर होने के लिए फेंकता है। तो, ...

lift - Generic types inside List in Scala -

I placed on the following: Val serializedClasses: List [MongoMetaRecord [MongoRecord [_ Unfortunately I can not know the exact type of elements and may have the following code fails: serializedClasses map (c = & gt; new RecordSerializer (c)) [error] JsonFormats. Scala: 19: inferred type arguments [_ $ 1] The type of class RecordSerializer does not conform to the parameter range [TK RecordSerializer.scala Object RecordSerializer {def applied [tk I do not know what the question is here. How to compile it? RecordSerializer takes a type mongorecord and your list does not capture the type of its items. If you want to get it to work, you will either need to capture the record type (you can use an HList provided by mourning to occupy the type of item) or you The record serializer must be rewritten so that it only gets information from the record on the runtime and is not dependent on knowing the compilation time type.

html - Table text-align style overrides align attribute -

मुझे निम्न तालिका मिली, जिसमे मेरा DIV केंद्र होना चाहिए: & lt; तालिका चौड़ाई = "100%" ऊंचाई = "100%" & gt; & LT; टीआर & gt; & Lt; td align = "center" valign = "middle" & gt; & Lt; div id = "कुछ केन्द्रीयडिव" & gt; & lt; / div & gt; & Lt; / टीडी & gt; & Lt; / टीआर & gt; & Lt; / तालिका & gt; लेकिन समस्या यह है कि एक वैश्विक स्टाइलशीट है जो परिभाषित करता है: td {vertical-align: top; पाठ संरेखित करें: बायां; } ऐसा लगता है कि स्टाइलशीट संरेखण और वैलाइन विशेषता को ओवरराइड करती है। और जब मैं शैली को ओवरराइड करने की कोशिश करता हूं text-align: center; यह कुछ भी नहीं बदलता है। एक div एक ब्लॉक तत्व है, इसलिए इसे टेक्स्ट-संरेखित करें: केंद्र का उपयोग करके केन्द्रित नहीं किया जा सकता। आप इसे डिस्प्ले: इनलाइन-ब्लॉक; पर सेट कर सकते हैं या इसे एक निश्चित चौड़ाई दे सकते हैं तो मार्जिन का उपयोग करें: 0 ऑटो;

javascript - Function expressions not updating values, functions beeing called only once (module) -

So basically this I want a way to update the function's values, so when it changes from another function, it still works correctly. Here's what I mean: function PropellingNozzle (power) {this.power = power; This.afterburner = "off"; Function acceleration (afterburner, power) {this. Afterburner = afterburner; Console.log (this.power); If (this. Afterburner == "on") {this.acceleration = this.power * 2; } And if (this is later) = "Off") {this.acceleration = this.power; } Console.log ("called"); Come back it Delegation} return {electricity: this.power, afterburner: this.afterburner, switch, afterburner: function () (if (this.afterburner == "off") {this.afterburner = "on";} and if (this. Afterburner = = "On") {this.afterburner = "off";}}, acceleration: acceleration (this is later, this.power)}} As you can see, I know that values ​​have been started parsing and what not, just experimenting and i...

c++ - Empty derived optimization -

Most C ++ programmers are aware of empty base class customizations / as with empty hair sections what happens? For example class EmptyBase {int i; }; Template & lt; Typename T & gt; Category received: T {}; Std :: cout & lt; & Lt; Sizeof (derived & lt; emptybase & gt;); // Is this a standard verdic on? Similarly, according to eBay, there should be an EDO that because a derived class does not provide any more members, nor does its virtual people present it for its parametrising type , It should not require more memory Is such a compatibility standard / possible? If so, what is the mechanism of such optimization , are they equal? Note: Using class templates that are derived from their parameter type, is quite specific. Subject is wasting space in such circumstances In the standard "empty base class" case is not real . Rather, it says (CF 1.8): [A] The most derived object will have a zero-zero size and one or more bytes of storage...

Java Intercept HTTP Request -

What's the best way to do this? I tried to use a server socket and changed my proxy settings port to send all traffic to all javascript. Well, it adds, but I can not read the request with the client socket .readLine (). I do not want to know how to code your code, so why not post it, I want to know what would be the best way to stop the HTTP request to read. I'm guessing that I would like to change the proxy port to change my app like traffic (like Burp Suite and WebSerab). So in other words, would anyone just be asked to read an example or pseudo code by changing the buffer suit / WebScarab HTTP proxy port? Try this and never forget to configure your browser. ServerSet SSC = New ServerSet (8080); While (true) {socket s = ss.accept (); BufferRadder sin = new buffed reader (new input striker reader (szet inputstream ())); String l = sin.readLine (); Println (L); URL url = New URL ("http: // your_URL"); URL Connection URL = url.openConnection (); Buffere...

How to put timer in AlertDialog.Builder in android&? -

Image
I created an alert dialog and I should have any type of timer installed. The timer should show 90 seconds to 0 seconds time Do anyone know that text weights ("90 seconds for the acceptable seconds ...") know the way to change every moment with different text? ("90 seconds for acceptance ..." -> "Acceptable to 89 seasons ..." -> etc.) Is it work for you Does it? New countdown update (Videvive) Vivib Id (RIDACP_text), 90, new countdown update callback () {@ Override Public Watch on Containment Complaint (Text View Text View) { Toast.GetApplicationContext (), "Boom!", Toast.LNGTH_LONG) Show ();}}); * / Private Static Class countdown update run {personal callback mCallback; Private industries mfm; Private text view mView; Public countdown update (textview view, at se, callback callback) {mCallback = callback; MFrom = to; MView = View; MView.post (this); } @ Override Public Wide Run () {mView.setText (mFrom + "seconds for acce...

mysql - Use the result of a Subquery in WHERE CLAUSE -

I am trying to use the result of a subquery in the WHERE section of the query that I want to use is the attribute See last_contact below. selected last_contact as pre-name, surname, type, (select max (completed_date) from tblTasks where prospect_id = tblProspects.prospect_id and complete = '1'), where tblProspects created_at hidden Happened! = '1' and type = 'Prospect' and last_contact & gt; I get a SQL error: # 1054 - In the unknown column 'last_contact' where 'clause' P> Any help would be greatly appreciated. Thank you. "itemprop =" text "> You need to use order to refine your results by custom alias coulmn > Segment where they are the segment pre-selected names, aliases, types, (Max can not be used in the completed_date selection)! TblTasks from where prospect_id = tblProspects.prospect_id and complete = 'Last_contact', 'where' created from tblProspects hidden = '1' ...

jquery - Rails 4 Countdown timer -

Hi IR is trying to implement a countdown clock in a Rail 4 application. I came in Keith Jungle Plugin with a similar question. A simple countdown timer is being done to work on the problem because I can find any simple examples in the Rails 4. I will only add a countdown time when a contest begins like a timer starting from 10 days = days: Hour: min: sec I downloaded the countdown package and added * = jquery.countdown.css for app / assets / stylesheet / app.css I added // // jquery.countdown .js My App / Aus For Tion / javasript / application.js and I jquery.countdown CSS in your app / views / layouts folder and JS files added to both. I have a gem 'jquery-rails' gem in my gem file. Do I put my competition in my competition. Jo.copy file I have $ (function () {$ ('# Till2d'). Countdown ({to: '+ 2d'});}); And it's called in my competition view like My app / scene / contest show.html .... where I want to show the timer Prizes: & ...

map - Create arc from MultiPoints Topojson in d3.js -

I'm new to D3 and the following problem is: I want to display the status and trails of all types of ships. The data is in the toposan format: Each vessel has an array of conditions in the form of latitude / loan. I want to add these posts to the arc. My code is to display ships at its last location, which works fine (see picture). To get the trails I have a nested loop which is probably not the best option, although I am able to print the correct latitude / loan. I have no clue as to how to proceed from there and to join the thesis connecting the bets. Any help is appreciated! Latest Status Ships such as "ship / container-topo. Jason", function (error, collection) {// point (work) .append ("path") .datum ("hospital", ".9"). Style ("opacity", ".9") .attr ("opacity", ".9"). ("D", path) Features = Collections. Objects. For collection.geometries (var k = 0; k & lt; features.length; k +...

c - Errors in code. I do not know what category it falls under -

** I added the new code. I do not think there is a problem, but the program stopped after entering the item's code. What can I do to fix it ??? zero cart () {int code, amount; Float weight, value, total_weight, total_price1; Four products [20]; Switch (code) {case 1: product = "cement"; Weight = 20; Value = 18; break; Case 2: Product = "Concrete"; Weight = 30; Value = 25; break; Case 3: Product = "Ceramic Tile Floor"; Weight = 0.1; Value = 2.2; break; Case 4: Product = "foam insulation"; Weight = 0.1; Value = 2.2; break; Case 5: Product = "Fiber-Blocked Cement"; Weight = 35; Value = 50; break; Case 6: Product = "thick glass panel"; Weight = 20; Value = 50; break; Case 7: Product = "Thin Glass Panel"; Weight = 10.5; Value = 30; break; Case 8: Product = "Iron Beam"; Weight = 5; Value = 10; break; Case 9: Product = {"Iron Rod"; Weight = 1; Value = 5; break; Case 10: Product = "Plaster...

c# - Can I save a DOCX file as HTML using the DOCX Library? -

I'm using the DOCX library to manipulate * .docx files. I use a * Docx file as an HTML file, but using this code: (DocX sourceDoc = DocX.Create (sourceFilename)) {sourceDoc .SaveAs (sourceHTMLFileName); } ... is not working (sourceHTMLFileName "Bla.html"). Is this possible? If so, then how? The author of DOCX has said that his library does not support this feature yet. I got a link to the library.) The quote from the link: I would love to add this functionality to DOCX, but there is a problem. [...] This is the only easy way to convert, using Microsoft's Office Interop libraries [...] Is there no way to make a conversion without installing Word.exe on my machine? I did not say that, I said that there is no easy way. Looks very promising, now if only I can find the time. He suggests an alternative solution using Interop but it can not be possible on the basis of your environment. Code> Save is from the file that ends in .html ;...

Complex Maps in R Using ggplot2 -

Image
I recently need to create a map using United statistical areas for America - how can I share this I want to share it. This applies only if someone wants to use a zip code or other division (county, congressional districts, etc.) 1) You need to get shaped shapes by any program to make a map - they basically define polygons that make up shapes (state, zip, CSA, etc.). Census Bureau in America Provides those people (I'm sorry, but they are so big that I can not provide data for an example) . Open them and keep them in the directory of your choice. Make sure that you set it as a work directory using setwd () 2) In the package maptools, use the ReadShapeSpatial files in R Need to import into the spatial dataframe object. In my case I read 2 files, the state to attract the metro areas and the state to attract the CSA file. For simplicity, I created an ID field in each, it is not necessary. Please note rgeos as well, tries to use gpoclib by default maptools but there are s...

r - Performing same action on multiple tables in for loop -

This is a very simple version of what I'm trying to do. In short, I make some metrics, which I want to take action like loop in In this example I want to print summaries for each matrix, but I do not know how to reference matrices for the loop. Any help is greatly appreciated: For (i in 1: 3) {x returns (this string As is evaluating 'DF3'): Classroom Mode 1 character character length Class Mode 1 character Character length Class Mode 1 character character How do I get it back? V1V 2V3 minimum: 1.0 minimum: 3.0 minimum: 5 first Question: 5.0 First Question: 3.0 First Question: 5 Mean: 6.0 Mean: 4.0 Mean: 7 Mean: 5.6 Mean: 5.2 Mean: 7 Third Quiz: 6.0 Third Question: 7.0 Third Question: 8 Max: 10.0 Max: 9.0 Max: 10 V1 V2V3 Min: 2 Minutes: 1.0 Min: 4.0 1 km First Question: 3.0 First Question: 4.0 Mean: 7 Median 3.0 Mean: 6.0 Mean: 6 Mean: 3.4 Menu: 6.6 Third Quiz: 3.8 3 M.M. Third Question: 9.0 Max: 9 Max: 6.0 Max: 10.0 V1 V2 min: 1.0 minus 5.0 Minimum: 1.0 1 ...

Difference in using function type vs function pointer as C++ template function parameter? -

Something related but I could not get rid of all my doubts. What is, if any, template & lt; Void F (int) & gt; Void fun1 (int a) {f (a);} and template & lt; Void (* F) (int) & gt; Void fun2 (int a) {f (a);} ? I tried to start something like both called zero (int arg) {...} int main () {joy 1 (10); Fun2 (20); Return 0; } And seeing the assembly code generated by both Kleng 3.4 and GCC-4.8 (both for OOs), I do not make any difference to me. I know that the name of a pane is passed on as an argument for any type of indicator, but there is no clear explanation about it, when the template in the form of it immediately I used to say that in the first template, there is a type of "something" in the template, which can be said with the argument of int and nothing returns, whereas in the second template "f" such "something" For one Is the indicator and in both implementations, the use of F can be done in the same way as it...

android - Java.lang.NullPointerException Error in the code -

I am getting an error which says as a Java tap point exception. I tried debugging and saw that the error only continues I think that there is a problem with printwriter or the client object Is this an initialization error? I have closed every socket too. Is there something like I have some other place? The code is: package com.example.temp; Public Class Main Activity Activity (Personal Socket Client; Private PrintWriter PrintRighter; Private Editing Test Textfield; Private Button Button; Private String Messsage; StringBinder SB = New StringBuilder (); Public Final Static String Extra = "com.example.temp.MESSAGE" ; Secured Last Fixed Time TIME_DELAY = 5000; TextView mTextView; Handler Handler = New Handler (); Int count = 0; String Data = "; @ Override Protected Zero (Create Bundle Get InstantStat) {Super. NET (Saved InstantState); setContentView (R.layout.activity_main); MTextView = (TextView) Find ViewById (R.id.text_id); Messsage = mTextView.getText (). ...

Assigning an array to a single key in php -

I'm trying to provide one key with an array. The array of values ​​as I am trying to assign is as follows: $ entity_items_array [$ entity_restrict] = $ entity_items; The key, $ entity_restrict, looks like this: 0 [1] 'user' array, $ entity_items looks like this: = 1] [2] => 2 [3] => 3 [4] = & Gt; 4 [5] => 5 [6] => 6 [7] => 7 [8] = 8] [9] => 9 [10] = & Gt; 10 [11] => 11 [12] => 12 [13] => 13 [14] => 14 [15] => 15 [16] = & gt; ; 16 [17] = & gt; 17 [18] => 18 [19] => [20] = 20 [21] => 21) And I'm trying to assign a key like this: But for some reason, when I look at $ entity_items_array, I get the value: array ([0] => users) What am I doing wrong? Am I not assigning data correctly? The code you posted seems to work, I took it and re-presented it and it Found: $ entity_items_array = array (); $ Entity_restrict = 'User'; $ Entity_items = array (0 => 0, 1 => 1, 2 =...

sql - How do I get the table to display only data with a specific substring in it -

I have to show all the products in which they contain the word "transducers" I can not like I try to use And I get an invalid relational operator error. Whatever I can think, I have tried and nothing is working. I'm using SQL Developer 4 code:. Select product_name, a_product P include the name a_item i join p.product_id = i.product_id a_sales_order so i include .order_id = so.order_id at a_customer c so.customer_id = C.customer_id Output: PRODUCT_NAME name -------- ------------- --------- ---------------------------- ------------- ---- Aft Transducer Bus Electronics 75 Gauge Wire Line Timelines Aft Transducer Vollyrite NTS Transducer Every Mountain Sneaker Lock Switch Size NTS Transducer Size Up Sft Transducer 55 Vollyrite 75 The wire line size above I also mentioned that it has been tried to be used, but he gave me an error. I used that: which I added after joining. The desired output will look like this: PRODUCT_NAME name --------------------...

javascript - I am unable to make jQuery Work. What am I missing? -

I am trying to hide, show, change the images, but I am unable to do anything. I see the button but nothing is happening. Is the link for jQuery wrong or is it something else? What I've done does not work, it's not sure what to do at this point ... & lt; Html lang = "en-us" & gt; & Lt; Top & gt; & Lt; Meta charset = "UTF-8" & gt; & Lt; Title & gt; JQuery & lt; / Title & gt; & Lt; Script src = "// ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> & Lt; Link type = "text / css" rel = "stylesheet" href = "jquery.css" /> & Lt; Script type = "text / javascript" & gt; $ (Document) .ready (function () {$ ("img"). AddClass ("wrappedElement"); $ ("# Hide All Images"). Click (function () {$ ("img"). " Fast "); $ (" Show all images ") (function () {$ (" img ...

PHP declaring global variables in function -

I've been on it for two hours, maybe I can give some help. OK, so I have a basic $ _POST variable that the user submits as you can see below, the code first checks that the value was submitted at all, and if it was a default Value is not set to If the user has submitted a value, then it sets a variable (used later) to submit the value you can see below your code. if (! Isset ($ _ POST ['psize'])) {$ pSize = "16"; } And {$ pSize = ($ _POST ['pSize']); }; Copy $ pSize; The problem with the above is that I will have 50 or so different areas which the user will submit, and this will only be suitable for myFunction ('name'), 'default', 'value'); to write above for each region. However, I'm running into a problem. Here are some things I'm trying to do. (Sorry for any small errors; I do not have the actual code, which I was trying to do. Function new function ($ title, $ default, $ value) if (! Isset ($ _ POST [$ value])...

How can I make make a border for a clicked imagebutton in Android? -

I am using Imagebuttons to show some icons in my Android project. & lt; Android: layout_height = "wrap_content" android: layout_alignParentLeft = "true" Android: layout_alignParentTop = "true" Android: padding = "20dp" Android: contentDescription = "@ String / button_on" Android: background = "@ Android: color / transparent" Android: src = "@drawable / button_on" /> I think, when the button is in a pressed state, there will be a white border with rounded corners. What can I do to do this? Can this just be used on code or will I need an extra background image? This is a method if you do not want to create separate images with the border Make Drawable XML with your border style (e.g., border.xml) & Lt; Padding android: left = "1dp" android: top = "1dp" Android: right = "1dp" Android: Below = "1dp" /> & Lt; Corners Android: bottomRightRadius...

Can someone help me sharing python code or ideas for retrieving last 7 days mails sent to a certain group? -

I want to retrieve the last week's mail which is sent to a certain group, "through Pione "Xyz@gmail.com." My goal is to 'reboot' my last week's mailbox with seratin keywords. Please guide me how can I move forward? GMM supports IMAP ().

c - Daemon process unable to find file (specified via relative path) -

I have a daemon process that spans multiple threads, one of which handles HTTP requests handler Intended to return a file located in resources / html / index.html I have the following code: zero * Read_file_ex (char * file_name, int32_t * data_len) {FILE * fp; Fp = fopen (file_name, "r"); ... fclose more code to fetch file contents; } Zero * read_file (char * file_name) {read_file_ex return (file_name, NULL); } In another thread, I call: read_file ("resources / html / index.html"); When a request is made for that file, the code crashes with a "segmentation fault" error. When I use GDB to break FOPE, I think NULL is returned and set to errno 2 (file not found). In addition, when I change the code to use the full path of the file: /usr/sbin/app/resources/html/index.html Then the `fopen () 'index is able to find the file and everything works fine. One more thing is that this error occurs when Debian runs on Linux but Ub...

java - How to Double-Buffer JLayeredPane -

I am currently creating a path-laying tile game in Java, where I am using ZLARPEN with multiple layers I am The game runs fine, but the repetition method is called every time, the whole panel flicker. Now I have a timer running game, where every tick automatically tiles a path with the path in which I have kept it. Naturally, I will need to update the screen to display the user's changes, but the problem is that the rearrangement method is redrawed on all layers of layerpane, causing the flicker on the map area of ​​each tick screen. Will happen. Although it is tolerant, I would like to get rid of it, so it looks good. I have researched the use of double buffering and have also decided to double the pane to correct the buffer (such as the pen. SetWood (true)), but different implementations There was no fate together. Is there a way to pull the entire panel with all the layers for every tick in an external buffer, then copy it to the main screen in one? Thanks

css - jQuery minicolor.js not behaving as expected -

Image
I am currently implementing jQuery in an input box in my website, as you can see the documents listed above According to, I think everything is done correctly, even then I have a problem. jQuery: $ (function () {$ ('.color'). Each (function () {$ (this) .minicolors ();}) ;}); HTML & lt; Form & gt; & Lt; Input type = "text" class = "color" & gt; & Lt; / Form & gt; I have also included the jQuery, minicolor.js, and CSS file properly. However, for some reason it ends up looking like this. This works, But for that the graphics are all messing - which I think will be related to the CSS file, but I am positive I have added it correctly How can I fix it? It seems that the jquery.minicolors.png file was not loaded (This is not in your themer folder.) Just download it here:

asp.net mvc - Disable button with JQuery -

I'm peating my head with this and it sounds pretty easy, but I do not think so. The story is working with NopCommerce which is an ASP.NET MVC application and what I am trying to do, is that the user is going through the checkout process and they are on the shipping page, I want I want users to click on the "Continue" button. The Save method is called on the click event, I want to open a dialog box and give it some information. Then on the dialog box, they choose Yes / No and depending on their selection, either update their records depending on them, or if they choose yes and continue as if the button has the original Or if they do not click the box will not be done again, the button will do the job as it was originally clicked to go to the next section. So this is just the HTML that looks like: & lt; / Li & gt; & Lt; Li id = "opc-shipping" category = "tab-section" & gt; & Lt; Div class = "step-title" & gt; ...

How to Deserialize a very Simple RestSharp JSON Object? -

Sorry that's definitely a dumb question, but I'm just using JSON with C #. I have this class: public class DBCount {public string calculation {get; Set; }} Let me create an example: public DBCN dbcount; My web service is returning to: [{"Census": "234"}] This code throws an invalid artist when He tries to deserialize the response: var client = new rest client ("http: //www.../") var request = new resuquest ("demo / jsodbcount.fp ", Method. GET); Request.RequestFormat = DataFormat.Json; Var response = client.Execute (request); RestSharp.Deserializers.JsonDeserializer deserialCount = New JsonDeserializer (); DbCount = deserialCount.Deserialize & lt; DBCount> (reaction); "Destination type can not be entered from source type" If someone can tell me a simple, simple example, I should be very grateful I have a basic The code is searched everywhere for sample. Thank you You already thought this...

Wordpress image sizes - scale and crop away odd number pixels after resize -

My settings for big image sizes are maximal-height: 1024 and max-width: 1024 something When images are reduced to 1024 widths, then there is a strange number height (683px) being a method of determining whether it is on the scale below and if the width is the height / breadth on the other side Close the pixels.

c# - How to detect the currently pressed key? -

In , you know, at any point in time, thanks to the current condition of the cursor class. The same thing is not available for the keyboard. Is it possible to know that, for example, the shift key is pressed? Is it absolutely necessary to track every keyboard notification (keydown and key-up event)? if ((Control.ModifierKeys and Keys.Shift)! = 0) This will also be true if Ctrl + Shift is below if you want to check that it is shifted alone, then If (Control.ModifierKeys == Keys.Shift) If you are in a class that receives control (like a form) You can remove the control.

xml - FreeSwitch - using mod_xml_curl for Dialplan -

I am using mod_xml_curl to register SIP users on the FreeSwitch server. I could get the user's information from the MySQL database, and now I have a problem with free switches dial-up. When I call any other registered user, it makes the hold_magic sound it does not call other registered users. No mod_xml_curl for dialing * no mod_xml_curl results for the directory * case 1 * - this works fine, but I can not use user information in the MySQL database. Case 2 * Use mod_xml_curl for directory. * There is no mod_xml_curl for the result of dialplan - Registration is using the MySQL database, but the call has failed. Case 3 * Using mod_xml_curl * for the directory using mod_xml_curl for the result of dialplan - The registration is using the MySQL database but makes the call hold_music sound Thank you. When you use xml_curl for dialplan what do you return to dialplan Are you? If you are returning a dialup that holds the music in hand, then it works. You can enable deb...

css - Issues with Telerik RadEditor toolbar in Chrome -

Image
I'm having some problems with the RadEdtitor toolbar in Chrome browser at this time (I'm using the latest Chrome). After clicking on the button I can not apply different font styles, font size and colors, nothing has changed. see below. Other browsers For example, Firefox & amp; IE, they're all working fine Do anyone have experienced this problem? What is your Telereak control version? If this is not the latest, test it. I went out that Q3 2013 SP2 is the last one. The first big release for 2014 will be coming soon. If you can break it here: just report them.

python - I am having trouble getting my function to return a global varriable -

traceback (most recent call final): file "c: \ user \ mitch \ document \ lab3.py" In line 18, the main () file contains "C: \ user \ Mitch \ document \ lab3.py", line 15, the main find in the calculation (volume) file "C: \ Users \ Mitch \ Documents \ lab3.py" In line 2, if the quantity> = 1 and volume def finddiscount (discount): If the quantity & gt; = 1 more volume & lt; = 9: discount = "0%" alip volume & gt; = 10 more quantity & lt; = 1: discount = "20%" alip volume & gt; = 20 more quantity & lt; = 49: discount = "30%" elif volume & gt; = 50 more quantity & lt; = 99: discount = "40%" elif quantity & gt; = 100: discount = "50%" print (discount) def (main): Quantity = int (Input ("How many packages have been bought?") Finddiscount (Quantity) value = Float (Input ("How much is each item? ") Try main def finddiscount (quantity): # Do...

EpicEditor: update database -

On my webpage I have 3 epic editors, each in my database contains text related to an attribute of the object when I read text updates I think, local storage is updated but what I want to do to save changes in my database. From the documentation, there is an export file: syncWithServerBtn.onclick = function () {var theContent = editor.exportFile (); SaveToServerAjaxCall ('/ save', {data: thecontent}, function () {console.log ('Data was saved in database.');}); } How does this work? Is there really a syndrome server? I see all the previews and fullscreen buttons are I think this means that there should be a '/ saving' path in my thoughts. How can I use the content in this view (updated content)? No, the sync server is just an example if you had a button that he did in the example, When you click the button you create, the editor grabs the content and then sends it to DB from a fake server. EpicEditor does nothing special for the server This examp...

Filtering the data using For..Next and left function using excel vba -

I want to list all files only with specific keywords So I'm using the left function. The left work will match the search text box Please help Compilation error box for filtering unused file pop-out "Next to Without" Please help, thank you. NextRow = Sheets ("Sheet1"). Room (rows.kount, "A"). Finally (XLEEP). For every objFile in Robbs + 1 objFolder.files (search for (objFolder.Name, lane (search. Text)) =). Sheets ("Sheet 1"). Room (NextRow, 1). Value = objFile.Name sheet ("Sheet1"). Room (NextRow), 2) .Value = objFile.Path Sheets ("Sheet1"). Room (NextRow, 3). Value = Format (objFile.DateLastModified, "mm / dd / yyyy") NextRow = NextRow + 1 Next objFile Else msgbox "Error" end if

c# - asp.net HyperLink unable to locate url -

Image
ash below: hyperlink that did not bind the hyperlink properly: gt; & gt; & lt; / asp: hyperlink & gt; Why hyperlink was disabled (like image below) and URL How to bind it correctly? It depends on where you use this hyperlink if it is a part of the page or user control It should look like this: & asp: hyperlinks Runat = "server" text = "go to project" navigate = url = '~ / project / project master.spack? Project id = & quot;' / & gt; If it is a part of the repeater or any other template container, you can use the Evil or Bind method & asp: hyperlink runat = "server" text = Navigate to the "Project" Navigate URL = '~ / Project / Project Manager.aspx? Project ID = & lt;% # Eval ("projectID")% & gt; / & Gt;

tcp - Solaris tcp_time_wait_interval configuration -

In my Solaris server, I have an HTTP server that handles multiple incoming connections. In my server logic, this manually closes the connection to the client, when I call the netstat -an command in my server, many TIME_WAIT states appear. so that I will change the tcp_time_wait_interval for 10 seconds with the command: NDD-set / dev / tcp tcp_time_wait_interval 10000 but I read from the User Guide, it says: "Do not set value less than 60 seconds." / P> Do anyone know why Oracle suggests? User Guide URL is:

javascript - Does this function execute : jQuery(".class").function(); if the class is not found on this page? -

Just a quick question. I am thinking that if the following code contains unslider () if there is no .banner class on the page then run it? jQuery ("banner"). Unslider (); I do not want to run it on pages, where nobody is there. Banner class Do I need to do something if (jQuery (".banner")> 0) {jQuery ("banner"). Unslider (); } Yes, it runs and executes the following: $ .fn.unslider = function (o) {var len = this.length; / Enable multiple slider support (unit) {// copy of cache $ (this), then this is me var = $ (this); Var example = (new unsledder). (Me, o); // An unsuller example for me. Data ('assisted' + (lane> 1? '-' + (index + 1): ''), example);}); }; Then it does .each () on your archive. However, if that collection is empty, then the function will not run .each and therefore the best description of "not much" will be that if you enter $ ( '. Banner'), what will happen ...

php - Advice To Improve Efficiency Of API Call And Cache -

तो मेरे पास निम्न कोड है: निजी फ़ंक्शन getArtistInfo ($ artist) {$ कारीगर = json_decode ($ कलाकार, सच); $ ArtistObj = सरणी (); // अमेरिकन प्लान ($ कलाकार); $ कलाकार ओबज ['आईडी'] = $ कारीगर ['नाम'] ['आईड्स'] ['नाम']; $ Memcache = नया मेम्केचड ($ कलाकार ओबज ['आईडी']); $ कलाकार कैचेस = $ memcache- & gt; getMemcache (); अगर ($ कलाकार कच === झूठे) {$ कलाकार ओबज ['नाम'] = $ कारीगर ['नाम'] ['नाम']; $ कलाकार ओबज ['छवि'] = $ कारीगर ['नाम'] ['चित्र'] [0] ['url']; $ InitArtist = array ('id' = & gt; $ artistObj ['id'], 'name' = & gt; $ artistObj ['name'], 'image' = & gt; $ artistObj ['image']); $ कलाकार $ = $ इस- & gt; बिल्ड कलाकार ($ कारीगर, $ कलाकार ओबज); $ Memcache- & gt; setMemcache ($ artistObj); } और {$ initArtist = array ('id' = & gt; $ कलाकार कैश ['आईडी'], 'नाम' = & gt; $ कलाकार कैच [...

ActionScript 3.0 The Definition Of Base Class GameFrameWork Was Not Found -

Image
पैकेज com.efg.games.stubgame {import flash.text.TextFormat; आयात करें Flash.text.TextFormatAlign; आयात flash.geom.Point; आयात com.efg.framework.FrameWorkStates; आयात com.efg.framework.GameFrameWork; आयात com.efg.framework.BasicScreen; आयात करें com.efg.framework.ScoreBoard; आयात com.efg.framework.SideBySideScoreElement; सार्वजनिक वर्ग के मुख्य गेमफ़्रेमवर्क का विस्तार { (नोट: यह कोड का सिर्फ एक भाग है)। त्रुटि शीर्षक में कहा गया है। GameFrameWork.as के लिए मार्ग कक्षाएं / कॉम / एफएफ़ / फ्रेमवर्क / गेमफ़्रेमवर्क.एसर मार्ग है स्रोत वर्गों com efg ढांचा गेमफ्रेमवर्क। परियोजनाओं stubgame फ्लैशआइड stubGame.fla stubGame.as com efg खेल stubgame Main.as StubGame.as अपने "स्रोत पथ" पैनल में ../../../../../../../ वर्ग / जोड़ें।

CSS3 Translate 3d Transform with JavaScript Drag -

परिप्रेक्ष्य: 400px; रूपांतरण-शैली: संरक्षण -3 डी; परिणत: translateX (- $ drawerWidth); संक्रमण: # {$ संक्रमण}; window.onload = addListeners (); फ़ंक्शन addListeners () {document.getElementById ('ऐप')। AddEventListener ('मूसुडाउन', माउसडाउन, झूठी); Window.addEventListener ('mouseup', mouseUp, गलत); } फ़ंक्शन mouseUp () {window.removeEventListener ('mousemove', divMove, true); } फ़ंक्शन माउसडाउन (ई) {window.addEventListener ('माउसमोव', डिवमॉव, सच); } फ़ंक्शन divMove (ई) {var div = document.getElementById ('एप'); Div.style.position = 'रिश्तेदार'; Div.style.left = e.clientX + 'px'; } मेरे ऊपर सीएसएस और थोड़ा ऊपर जेएस है। मैं एक दराज खींचने और प्रकट करने की कोशिश कर रहा हूं मैं एप कैनवास को छूकर न केवल ट्रैक करना चाहता हूं, लेकिन ऐप के बाकी ड्रैगिंग के साथ मैं नेविगेशन ड्रावर को ड्रैगिंग और रूपांतरण ट्रैकिंग 1: 1 के साथ देखना चाहता हूं। विचार? मुझे पता है कि यह पढ़ने के लिए कड़ी मेहनत है ... जब आप किसी डिवेल को ख...

android - conditional statement for getting TextView -

I have to get an EditText object which is not a search bar in the app with text As a current location , if I have already created a search query with myText , then no current location text is displayed. And the search bar shows myText . I am writing test cases using a single object. How can I write a conditional statement to get the EditText even if something like the text shows if! Got a single Tag ("Current Location") Single Search Tag ("my text"); This is what I am currently doing EditText text = (EditText) solo.getText ("Current Location"); If (text == null) {text = (EditText) solo.getText ("myText"); // My rest code goes here .... but it throws an exception if current location is not present in the search bar. junit.framework.AssertionFailed error: Text with text: 'Current Location' is not found! Please suggest correctly. Try this code: (! Solo.searchText ("Current Location")) if...

java - Eclipse Activity Not Working -

I am trying to hide elements in the UI through such activities & lt; Plugin & gt; & Lt; Extension point = "org.eclipse.ui.startup"> & Lt; Startup class = "startup" & gt; & Lt; / Startup & gt; & Lt; / Extension & gt; & Lt; Extension point = "org.eclipse.ui.activities" & gt; & Lt; Activity id = "com.lowcoupling.actitivities.unwantedActionSet1" name = "Unwanted Search ActionSet" & gt; & Lt; / Activity & gt; & Lt; ActivityPatternBinding activityID = "com.lowcoupling.actitivities.unwantedActionSet1" isEqualityPattern = "true" pattern = "org.eclipse.papyrus.infra.discovery.ui.menu.toolbars.discoveryCommand" & gt; & Lt; / ActivityPatternBinding & gt; & Lt; / Extension & gt; & Lt; / Plugin & gt; But when I run this plugin as another eclipse application, the button is still there. What am I doing wrong? ...

c++ - How to Return a vector to Windows thread function? -

I have written a library that contains functions and two thread functions. From the I user program, As a parameter I will call in the form. The function creates threads according to the number of drive IDs given by me. Then this thread process will process the drive to get the list of folders from the drive and keep it in line once it is finished, it is called certain threads (which I have started with MAX_Threads) and this child Threads will act on the queue and list the files inside the drive in their respective vector. Now my problem is that I have to return these vectors to the statement which is called a library. I referenced through many sites, but I did not find the desired results. The snippet I have implemented .. ListFiles (string drive) {create loop (not drive) threads} DWORD WINAPI File List: Parathread (LPVODS) {// Process Drive Directories. Push_back (path + "\\" + FFD cipher name); // global queue // it will be closed and then each thread loop (max-thr...

php - How to convert this url to %20? -

There is a very simple problem that can be solved for a long time, but I am not getting what I need. / P> I have an image URL like this: $ image = 'http://perfumepalace.arctechsolution.com/image/cache/data/another/ For him / Believe 100 ml EDP-150x150.jpg '; and want output as http://perfumepalace.arctechsolution.com/image/cache/data/another/For%20Her/ Believe% 20100ml% 20EDP-150x150.jpg Yes, you will tell me that I can use urlencode or rawurlencode. I believe I have tried and still there is no luck. I like this with urlencode http% 3A% 2F% 2Fperfumepalace.arctechsolution.com% 2Fimage% 2Fcache% 2Fdata% 2Fanother% 2FFor +% 2FBelieve + 100ml + EDP-150x150.jpg And with rawurlencode I have received the output like this: http% 3A% 2F% 2Fperfumepalace.arctechsolution .com% 2Fimage% 2Fcache% 2Fdata% 2Fanother% 2FFor% 20Her% 2FBelieve% 20100ml% 20EDP- 150x150.jpg Straw_Replay I can get the same Is what I want to do: str_replace ('+', '...

java - What is gradle android and how to import gradle project in Eclipse Juno? -

Gradle is a bit confusing, can someone tell me what is Android? How to integrate graderl in eclipse june (if it is possible)? How to import Gradeley project into Eclipse? Gradle is the main component of the new Android Build system, introduced with the new IDE for Android development, Android Studio Gaya. This is a good read. It is possible to use a new grade-based build system with Elypes, just follow the steps given here:

Can I merge multiple Android keystore files into one? -

I found a little disturbing situation with Android caststore files, currently I have some different apps signed with a different keystore file Here is how: AppName1.apk signed with AppName1.keystore AppName2.apk signed with AppName2.keystore AppName3 .apk signed with AppName2 .keystore Each app has different names and surnames for each app. Now I am learning that there is some stupidity to do this and it would be better to use a single keystore file for all of my apps. I am about to publish a new app so I I am trying to get it around this time. My usual question is, what can I do to make life easier in the future? I have read that I can rename one of them and change the nickname, in theory, can I sign my next app with any existing keystore? This would mean that at least 2 apps have been using the same keystore and it would have a cognitive name. Edit: For reference, it was one of the tutorials I was reading today: And also other stack overflow Answer: I und...

php - push into every element of an multidimentional array -

Sorry for being a novice I have a multi-dimensional array array (3) {[0] = array (2) {[type] = & gt; Car, [model] = & gt; Mazda} [1] = array (2) {[type] = & gt; Car, [model] = & gt; Lexus} [3] = array (2) {[type] => Car, [model] = & gt; Lexus}} Now I want to loop through this array in every way and with the result i.e. The car company wants to get links from the database and push it into this current array. The end result should be shown array (3) {[0] = array (3) {[type] => Car, [model] = & gt; Majaa, [link] = & gt; Http://mazda.com} [1] = array (3) {[type] => Car, [model] = & gt; Lexus [link] = & gt; Http://lexus.com} [3] = array (3) {[type] = & gt; Car, [model] = & gt; Rangerover [link] = & gt; Http://rangerover.com}} I can easily loop through this array and get results but I do not know that this new result is this array How to push in Please help !!! If you have a website in the database, then it may b...

php - create automated email for all abandoned purchases -

I need logic flows to track the purchases left by customers so that I can capture it and email to the administrator PrestaShop can My shop is at PrestaShop 1.5.5.0. Please suggest / guide. Thank you! So you want to send email only to registered customers when they give their shopping cart XX hours / day leave for. It is easy to achieve, but you still need to create a custom module to achieve this result. Customers Need to see a table called / strong>, where you can get all the relevant data for your custom module.

java - Unable to load CSS in Spring Mavenized project -

Image
There is a problem in CSS path in my project. It is a file structure of a Spring Maven project I have written: & lt; Link rel = "stylesheet" href = "/ treninky / css / bootstrap.css" /> But it still does not work. I am not getting any solution Can anyone help me? Add it to your web.xml & lt; Servlet-mapping & gt; & Lt; Servlet-name & gt; Default & lt; / Servlet-name & gt; & Lt; URL pattern & gt; * CSS. & Lt; / Url pattern & gt; & Lt; / Servlet-mapping & gt; And it is better to move your CSS to another directory like src / main / resources or it is not that there is no such thing in the web-INF

linq to entities - Entity Framework query - return unique values from child table -

Image
I have an entity framework model and the data in related database tables is: Question: How do I return to the unique form of model Ask the sales_type entities for a given person? (Person_sales table is too big, ~ 1 BB rows, other tables are relatively small) Example: I want to know all the unique sales_type for a person "John". Will return 3 unique items: "Internal", "External" and "Mixed" You can defintely person_id for person_sales table The index will be required and the query will appear in this way var salesTypes = (p.p. db.person in ps at db.person_sales p.id is equal to ps.person_id Ps.person_id in SM is equal to db.sales_mapping ps.sales_mapping_id sm.id in ST is equal to sm.sales_type_id st.id at db.sales_types, where p.name == "John" st.sales_name is selected ). Undoubtedly (); Generated will look like a SQL: SELECT [Distinct1]. [Sales_name] From AS [sales_name] [select [Extent4]. [Sales_name] ...

How can I check if a user is disabled in PHP? -

I am writing a PHP program to list user information. I have to check that any user is disabled in / etc / passwd , so I have to check that a specific user * or! is the / etc / shadow file. There is a problem here, my Apache server does not have access to the shadow file, and I think reading the shadow file is not safe in any case. Can anyone help me with this problem? Get results with the root shell script that runs with the cron I / var / www /. ../users.status.php & lt ;? for line in / etc / shadow store in Php die ("Do not open this file")? & Gt; Username: Active User Name 2: Inactive ... Create a second / php script that checks the created file with the user submitted value ...

javascript - convert time stamp to Date inside angular expression like {{new Date(timestamp)}} -

Today I came to know that it is not converting an angular expression into a date. So I just & lt; Th & gt; {{New date (elem.timestamp}} but it fails with internal angular error. So why is it not possible to put dates in angular expressions? Because angular expressions do not accept arbitrary JavaScript code, which also includes new objects. It is called an angular filter, they were specially designed for this matter. So this Instead of {{new date (elem.timestamp)}} you should write More information about the date filter can be found. Generally, more information about the filter can be found.

Add a thin line on the top of Action bar Android -

Image
I would like to add a thin line with purple on top of my verb bar like this: UPDATE Here's my theme . Code of Xml: & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Resources xmlns: Android = "http://schemas.android.com/apk/res/android" & gt; & Lt; Style name = "Myethem" Original = "@Android: Style / Theme. Halo. Light" & gt; & Lt; Item name = "android: actionBarStyle" & gt; @ Style / myactionbar & lt; / Item & gt; & Lt; / Style & gt; & Lt; Style name = "MyActionBar" Basic = "@Android: Style / Widget.Holow light.actionbora" & gt; & Lt; Item name = "Android: Background" & gt; # 00000000 & lt; / Item & gt; & Lt; Item name = "android: titleTextStyle" & gt; @Style / MyActionBarTTTAL Text & lt; / Item & gt; & Lt; / Style & gt; & Lt; Style name = "MyActionBarTitl...

c# - insert xml string to xml element using LINQ -

I have to add two XMLs that one of them is a template and the other is data, how can I do this? XML one: XML Two: & lt; Data & gt; & Lt; Page number = "1" & gt; Data 1 & lt; / Page & gt; & Lt; Page number = "2" & gt; Data 2 & lt; / Page & gt; & Lt; Page number = "3" & gt; Data 3 & lt; / Page & gt; & Lt; / Data & gt; link resolution: var content = XDocument .load ("content.xml") .Root.Elements ("Page"). Toofization (p => (int) p.Attribute ("no")); Var xdoc = XDocument.Load ("template.xml"); Foreign exchange (different pages in xdoc.Descendants ("Page")) {XElement data; If (content content.TryGetValue (int) page. ("No"), data released)); Page.ReplaceNodes (data.Nodes ()); }

jquery - Dudamobile working process -

Dudamobile is basically a conversion website that converts the existing desktop website into seconds on a mobile website. http://www.dudamobile.com/ But I am unable to get it working, like what to achieve in the background code For, through code? While the conversion displays this processing: 1) CSS and HTML Buildings 2) Navigating navigation, color and content. 3) Testing mobile website But how do I work in that way, if I want my website like this? / P> Thank you in advance. I read on my website, it seems that they are not actually responsible for your current website Instead, we create a new mobile site to remove content from our website and on some types of templates. We collect content from our desktop site, Facebook and other social media pages to create an excellent mobile website Whenever your desktop equivalent changes are made, your new mobile site is automatically updated This is done without ever affecting your current desktop site So it...