Posts

Showing posts from August, 2010

validation - Regex to match Hebrew and English characters except numbers -

I have a question: I want to do a verification for the first and last names with RegEx. I want to do it with numbers without just Hebrew and English. Can someone help me do that code? There is a limit in Hebrew for \ u0590- \ U05fe ( / ^ [az \ u0590- \ u05fe] + $ / i )

ios - Scrolling a Tilemap in Sprite-Kit (JSTileMap glitch) -

Image
Since JSTileMap Expands Escondition, you use the API to move and enlarge your tilemap like any other node. can do. However, I continue this strange effect / glitch ... code: _tiledMap = [JSTileMap mapNamed: @ "Cloud.tmx"]; If (_tillMap) {[auto addChild: _tiledMap]; } _tiledMap.position = CGPointMake (800, 0); SKAction * scrollLeft = [SKAction conduction: CGPointMake (600, 0) Duration: 4]; SKAction * scrollRight = [SKAction conduction: CGPointMake (700, 0) Duration: 4]; SKAction * sequence = [SKAction sequence: @ [scrollLeft, scrollRight]]; SKAction * Repeat = [Squection repeat acnection: sequence]; [Ditlide map run action: repeat]; Result: As you see Whenever the JSTileMap direction changes, depending on whether it's left or right, the image may be generated or something else, I can not explain it. It does not happen if the node itself is a SKSpriteNode I add numbers to the background image for the visual reference. Edit Further tests indicate tha...

wordpress - How to set default (angle) to map, default value to rotateControl? -

On a WordPress directory site, dubainurseries.com, I have Google map and my marker. Rotate by default, while it should be on the street view. Is there any way of doing it? It's really necessary to use a screen to show more markers in high zoom.

android - Animate buttons to slide and change nicely -

I saw this design mockup and I think the flow of the button is magnificent. Any ideas on how to be done on Android? Or is it iOS specific? Or not at all? There is not much experience in Android design in front of me. It is definitely possible that I want to see property animators for Android. You can go about on one side to animate the scene directly, so say that you have two buttons below as if you were in the posted link. When your activity or piece is made, initialize the button, but then set to view their visibility. INVISIBLE This way they will not be visible to the user and they will not be clickable. Then you can animate the button using XML Animation. You will need to create an animation that will bring the button as they are coming. So in your project, create a folder animation under resources and then create a file called slide_up_animation. It should look like this: slide_up.xml & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; ...

javascript - Putting a "resolve" on an angular-ui-router view isn't working - the page simply doesn't render -

$ stateProvider .state ('root', {url: '', विचार: {'root.base' : {TemplateUrl: '/templates/root/root.html'}, 'root.sidebar': {templateUrl: '/templates/root/root-sidebar.html', नियंत्रक: 'SomeDataController', संकल्प: {someData: function (डेटासेवा) {// डाटासेवा डाटा उत्थान के लिए एक कोणीय सेवा है DataService.getDataList (); // एक सरणी देता है}}}}}}); अगर मैं कोणीय- ui-router के साथ एक सबव्यूशन पर एक संकल्प को चलाने का प्रयास करता हूं, तो पृष्ठ बस रिक्त स्थान पर आ जाता है यदि मैं संकल्प छोड़ देता हूं, तो यह ठीक है - लेकिन मेरे नियंत्रक को तत्काल रूप से पहले कुछ डेटा के लिए हल करने की आवश्यकता है I क्या मेरे वाक्य रचना सही है? मैंने उच्च और निम्न उदाहरणों की खोज की है लेकिन मेरी परिस्थिति से मेल खाने वाले किसी भी व्यक्ति को ढूंढने में असमर्थ हैं। मेरी उपरोक्त उदाहरण को देखते हुए, "रूट-साइडबार" SomeDataController ", और क्या कुछडेटाकंट्रोलर को ऊपर घोषित रूट परिभाषा में डेटा का समाधान नहीं करना चाहिए? अपनी ...

c# - How to deserialize JSON into a List<KeyValuePair<string,string>> set -

मेरे पास कुछ जेएसओएन डेटा है: - {"mail": "mitch @ domain "नाम", "यूआईडी": "मिच", "जीको": "उपयोगकर्ता नाम"} क्या मैं मैं ऐसा करने की कोशिश कर रहा हूं, इसे आमतौर पर एक शब्दकोश में किया जाता है, हालांकि कुछ कुंजी को डुप्लिकेट किया जा सकता है - एक सूची & lt; keyvaluePair & lt; स्ट्रिंग, स्ट्रिंग & gt; यह वह प्रतिनिधित्व है जो स्वचालित रूप से .NET द्वारा उत्पन्न होता है जब मैं सूची & lt; keyValuePair & lt; स्ट्रिंग, स्ट्रिंग & gt; & gt; ऑब्जेक्ट System.Web.Script.Serialization.JavaScriptSerializer कक्षा जब मैं सीरियलकृत ऑब्जेक्ट को System.Web.Script.Serialization.JavaScriptDeserializer में प्लग करता हूँ मुझे खाली प्रतिक्रिया वापस मिलती है मैं देख सकता हूं कि JavaScriptSerializer का उपयोग करना संभव नहीं होना चाहिए। अपने व्यवहार को अनुकूलित करने का एकमात्र तरीका एक वर्ग के माध्यम से होता है, जो आपको सीरियलाइज़ेशन / डेसरियालाइज़ेशन प्रक्रिया को अनुकूलित करने की अनुमति देगा। द...

charts - Adding Matplotlib to Panel from wxglade -

Hi I'm trying to add a matplotlib chart example from the link below For the panel within the wxpython frame generated using WXGlade. Is there a panel panel panel which requires a chart? #! / Usr / bin / env python # - * - coding: 0.68 (standalone version) generated by CP1252 - * - # # wxGlade on Thu 31 July 22:23:21 2014 # import wx # start wxGlade: dependency import gettext # finally wxGlade # start wxGlade: extracode # end wxGlade class MyFrame1 (wx.Frame): def __init __ (self, * args, ** kwds): # start wxGlade: MyFrame1 .__ init__ kwds [ "style"] = wx.DEFAULT_FRAME_STYLE wx.Frame .__ init __ (self, * args, ** kwds) self.panel_22 = wx.Panel (self, wx.ID_ANY) self .__ set_properties () self .__ do_layout () # end wxGlade def __set_properties (self ): # start wxGlade: MyFrame1 .__ set_properties self.SetTitle (_ ( "frame_2")) # end wxGlade def __do_layout (self): MyFrame1 .__ do_layout sizer_ 21 = wx.BoxSizer (wx: #wxGlade begin.VERTICAL) grid_sizer_4...

python - label manipulation for 3d plot using matplotlib -

Image
I came up with the following code to create a shape in Python + matplotlib: fig = plt.figure (figsize = (10,8)) AX = fig.add_subplot (1,1,1, projection = '3D') ax.plot_surface (KX [kxl3d: kxr3d, kxl3d: kxr3d], KY [kxl3d: kxr3d, kxl3d: kxr3d], BLP [kxl3d: kxr3d, kxl3d: kxr3d], rstride = 8, cstride = 8, alpha = 0.4) for IDX range (3): ax.plot (KX [x_points ] Markum_spi [idx, 0], ky [y_points] momentum_spi [idx, 1], energy_spi [idx], linestyle = 'none', marker = 'o', markerfacecolor = color_spi [idx], markersize = 5) ax. set_xlim (kl3d, kr3d) ax.set_ylim (kl3d, kr3d) ax.set_xlabel (R '$ k_x [\ mu m ^ {- 1}] $') ax.set_ylabel (R '$ k_y [\ mu m ^ {- 1 }] $ ') Ax.set_zlabel (r' $ \ epsilon- \ omega_X [\ gamma_p] $ ') Output is: My question is, how can i move the z axis label and the label in the left hand They can mark the side of the figure, so that they are not overwritten by the rings and Increase the space between the labe...

Connecting to a mySQL database using Java -

That's why I have just started learning about the database this week and from what I want to be able to do One of my my SQL database that I created using Java I did some research and I have tried to find the right way to do this, I can not understand how. Here is my code: import java.sql.Connection; Import java.sql.DriverManager; Import java.sql.SQLException; Public Seven Menu {Public Zero Menu () {connection Conn; String url = "jdbc: mysql: // localhost: 3306"; String dbnm = "gym"; String driver = "com.mysql.jdbc.Driver"; String user name = "root"; String password = "password"; Try {class.forName (driver). NewestInstance (); Conn = DriverManager.getConnection (url + dbn name, username, password); System.out.println ("Connect to database"); Conn.close (); System.out.println ("Disconnected from database"); } Hold (exception e) {System.out.println ("no connection = ("); System.out.println (e.getMes...

data structures - What are Pascal Strings? -

Is the name of programming language or mathematician named after him? What are the defined characteristics of Pascal wire? It seems that the defined attribute is accumulating the length of the string in the first byte. In another article, I need to get an impression. During an unrelated SO thread, someone has mentioned that what are the advantages of Pascal string on zero-end strings? Or more generally, in what situations do Pascal strings do excellence? Does Pascal String apply in any other language? After all, do I have both words ("Pascal string") or only the first ("Pascal wire")? I am a technical author ... Pascal string is a typical but popularly influential Pascal implementation, designated UCSD therefore The UCSD string is a better word. This is the same implementation that makes bitcoin interpreters popular. Generally, this is not a specific type, but the basic principle of having first basic principle of character for character data. It ...

authentication - POST /token 400 (Bad Request) with ember-cli and ember-simple-auth -

I just set up the example using Cloud 9 and when I try to log in, I get 400 bad requests error Meets. I am pretty sure that this is due to the fact that Cloud 9 only opens port 80 (as mentioned in this note: Oeth 2.0 By default, the same domain is used in the form of authentication and to send an authentication request to the port that Ember.js is loaded by you instead of http: // localhost: 3000 There is a need to configure to use. Unfortunately I do not know how I can work around it. Any thoughts? host To whitelist in config: window.ENV ['simple-at'] = {crossover whitelist: ['http: //some.other.domain: 1234']}

Just squashed with git rebase, now can't push that squash to remote, says everything is up to date -

I need to squash the last 2 commands in one, which I have successfully written to git rebase -i HEAD ~ 2 With . git push master master I found: update everything thanks for any help "post-text "Itemprop =" text "> got it to work git push --force Basic Master

java - tomcat not generating hprof file on outofmemory error -

itemprop = "text"> There is some memory leak problem in my web app that is posted in the tanker. I able to find the root cause by setting the HeapDumpOnOutOfMemory error : -XX: -HeapDumpOnOutOfMemoryError -XX: HeapDumpPath = / usr / local / badge / log and the badge has memory settings: -Xms256m -Xmx768m -XX: PermSize = 128 -XX: MaxPermSize = 256M Out of memory issue, I'm seeing java.lang.OutOfMemoryError: Java heap space on the badge Log file, but .hprof file is not generated. I'm missing some settings here @ beny23 Is written in the form you should use the -XX: + HeapDumpOnOutOfMemoryError and as stated here: -XX: + HeapDumpOnOutOfMemoryError command line option hotspot tells VM to generate a heap dump when an allocation can not be satisfied with the Java Stack or the Permanent Generation. Running with this option is no overhead, and therefore it can be useful for production systems where OutOfMemoryError takes you to the surface ...

grid - Use gutter removed from a column into witdh of another column - Susy -

See below: I can not add mattress to padding, Because I am using My code is as follows: $ susy: (column: 12, gutter: 18/81, global-box size: border-box, debug: (image: Show,),); Container-selector-sample {@ included container (1170px); } .column-selector-sample {@include span (2); Include @ breakpoint (mobile) {@ built-in duration (12); }} .column-selector-sample {@include span (3); Include @ breakpoint (mobile) {@ built-in duration (12); }} .column-selector-sample {@include span (7); Include @ breakpoint (mobile) {@ built-in duration (12); } .column-selector-sample, .column-selector-sample {@include last; } There is a keyword for the farm! See. In this case, you want to use comprehensive : @include span (3 wide);

PHP type juggling, "String" == 0 and "String" == true -

मेरे पास एक बहुत ही सरल सवाल है PHP में, यदि ('abc' == 0) {// true} अगर ('abc' == 1) {// false} मुझे पता है कि पृष्ठ हमें बताता है कि ऐसा होना चाहिए। लेकिन, मुझे यह अजीब लगता है इसके अलावा, यदि ('abc' == true) {// true} अगर ('abc' == गलत) {// false} दो रूपांतरणों के पीछे तर्क क्या है? रूपांतरण 1 जब स्ट्रिंग और पूर्णांक तुलना किए जाते हैं, स्ट्रिंग पहले पूर्णांक में कनवर्ट हो जाती है और फिर तुलना की जाती है। चूंकि उन तारों में कोई भी प्रमुख पूर्णांक नहीं है, इसलिए वे शून्य में परिवर्तित हो जाते हैं। रूपांतरण 2 कोई भी रिक्त स्ट्रिंग मान बुलियन सत्य है। से: निम्न चीजों को रिक्त माना जाता है: "" (एक खाली स्ट्रिंग) 0 (0 एक पूर्णांक के रूप में) 0.0 (0 एक फ्लोट के रूप में) "0" (0 स्ट्रिंग के रूप में) नल फॉल्स सरणी () (एक खाली सरणी) $ var; (एक वैरिएबल घोषित, लेकिन बिना एक मान) इन्हें भी देखें:

fastcgi - Perl how to detect if running under Fast CGI FCGI -

If this is called under FCGI or CGI then how can I find out inside the Perl script? If FCGI is running, then load the FCGI module, something like this on top of the script: if ($ ENV {FCGI}) {Use FCGI; Use MyFCGIHandler; } I know that I can do something like this: Use FCGI; My $ request = FCGI :: request (); # Back or no, the program was run as a FastCGI or not $ isfcgi = $ req- & gt; IsFastCGI (); But that means that I have to load Fsijiai module and its request and isFastCGI methods say to check if that is not running the app under Fsijiai is not so good . found it on: #! Use / usr / bin / perl strict; Use warnings; Use CGI :: Fast QW (standard); Sub modes {my $ h = $ CGI :: Fast :: Ext_Request; If (defined ($ H) & amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; & amp; nbsp; IsFastCGI ()) {return 'FastCGI'; } Other {Return 'CGI'; }} While (CGI :: Fast> new ()) {print header (), Start_html ( "CGI or Fastsijia...

msbuild - C++/CX Visual Studio 2013 - Include / Reference / Link files Programmatically inside Visual Studio -

Instead of adding files using the Visual Studio IDE, I have to add files programmatically. This is because javascript has to be added during build-time from a basic folder (which is customized by customer) outside of the project, and is moved to build-time inside the project Although I can transfer the files in the project using the msbild approach, but the project does not reference those files. I have no MA without any luck Please do I know how to do this to anyone? Itemproc = "text"> Using the MSBield file (the main project file with the .vcxproj extension) I came up with a solution to permanently link files: & Lt; ItemGroup & gt; & Lt; Do not include any = "www \ **" & gt; & Lt; DeploymentContent & gt; True & lt; / DeploymentContent & gt; & Lt; / None & gt; & Lt; / ItemGroup & gt; To dynamically delete and copy files in the required directory: & Lt; Message text = "remove file...

javascript - angularjs handling $resource $promise errors -

Does anyone help me to recover hard-coded data in my fingers factory, if my API My hard-coded data are located in another factory named "Datafish", appreciate the help. service.factory ("'$ http', '$ resource', '$ q', 'datafactory', function ($ http, $ resource, $ Q, dataFactory ) {Var objFactory = {}; objFactory.getDaysOfWeek = function (include code) {var day = []; var API = $ resource (restURL + '/ daysOfWeek /'); API.query (). $ Promise. Function (data) {isEmpty = (data.length === 0); if (! IsEmpty) {days = data;};}). Key (function (error) {console.log ("Disapproved" + JSON.stringify (Error)); var data = faucet; day = datafreconditions of week; console.log (daytime label); // return 5}; console.log (+ day after "promise." Lamp); // return ' Promise 0 'return My datafactor is defined as follows: dataApp.factory ("datafactory", function () {objDataFactory = { }; ObjDataFactory.daysO...

xcode - Why does the strange value come out with an unnecessary % conversion in the code in C language? -

I started learning programming a few days ago, so basically I have no knowledge. Starting with I, and I have written a very simple code: int main (const arg) [arg] [printf ("% D +% d ", 1 + 3); Return 0; } With the above code, I got the value of 4 + 1606416608 and later found that the return value is wrong because I have added more than% d, so my question is How did this strange value really come out? If someone knows, please help me thank you! Do you know what you did beforehand, so to explain that Special implementation possibly: When you call printf , a new stack frame is pushed onto the call stack. Phone stack is the first time an outlet with a 'frame' according to a column fax. So if main is called logstuff , which is called printf then there will be three consecutive main frames, logstaff, then printf when printf , Its structure is removed from the structure and the execution continues with logoff. Therefore the frame usually includes ...

eclipse - Starting OSGI Declarative Services causing thread error -

I have a RCP 3.7 application in which two database connection is required, the code for each database is in a separate bundle first From the startup startup, Activator.start () was done in the way. I have re-enforced the code heavily to transfer the database to two declaratory services. This gave the purpose of breaking the stringent coupling and breaking the highly exposed package exposure (almost everything was exported) in the bundles. The challenge is now that both of the services do not start very quickly, the workload load and the thread are being violated. I have both services immediately = true. OPG) is on-1 (default), Equinox.ede and Equinoxamem2, the core. By default on time. I have tried to add the initial level for my bundles, but it did not help in getting them removed. Any ideas or suggestions about starting a database before service return? It seems that you are reaching SWT from within the DS activation thread. Please use Display.asyncExec to access SWT co...

c++ - Are Gtk 3.10 widgets backwards compatible? -

Image
I'm not sure this question should be on the Ubuntu site or here. I am posting it here because it is about programming, but it should probably be migrated. I use gtkmm on the Ubuntu with the defubt GCC tool series, and I'm just upgraded from Ubuntu 12.04 LTS 14.04 LTS, which uses GTK +310. I have a glade project file that uses Gtk :: TextEntry and Gtk :: SpinButton widgets. When I opened the project in Glade after upgrading from 12.04 LTS, I got this message when I tried to save the glade file. (I did not save the file - I was stuck with the old, so I would not have anything corrupted.) [window 1: frame1: box 1: layout1: spin button 3] Placeholder text 'object class' text entry' was introduced in gtk + 3.2 ] When I create and run the C ++ project some widgets are not correctly rendered (spin editing / down buttons are unavailable and the location where I am entering the label In it): All this was working fine before the upgrade. In Synaptic...

apache - Finding correct IP Address -

I suspect that Google is not telling me the correct public IP address of my machine. The reason for this is that I did a Google search of "What is my IP" and returned an IP address though, whenever I try to use that IP address, it does not work (for example : Http: //// pathtofile). Another reason is that when I did the same search on my smartphone, she produced that exact IP address. When I searched on the network from my phone, I found the correct IP address of my smart phone, whatever I know about IP address, since then two devices should not have the same address because in this way the internet Identifies your machine. So from these 3 experiences, I have concluded that Google is not telling me its IP address, but instead of the IP address given by my wireless router, how do I get the right public IP address for my machine? Google will give you the public IP address of your router, not your computer / device's IP address. Routers are routed through and Google...

ios - Is it possible to detect facebook/gmail banner/alerts notifications -

Is it possible to detect Facebook / Gmail banner / alert notifications within our app? So if I have received a Facebook notification, then is there any way to call within my app? Or is there no way to find out? Unfortunately, not all apps run in their own sandbox and can not access other apps from these apps. Types of things

Linq to SQL not querying memory -

I was questioning results of a query that I memory'm using Linq to SQL and always thought . I have just seen the database and it is showing thousands of questions instead of 1, which I expected. My approach has been to run a query and then use the linq to find within the resultset. / P> IQueryable & lt; Mapping & gt; FieldList = db.mappings is equal to db.meta Join mm.secondaryMetaItemId miles mm Select mi.metaItemId db.meta meet objects mo.metaObjectId where mm.linkageId == 277 mm mi.metaObjectIbjects on; (Int i = 0; i & lt; 100; i ++) {for mapping thisVar = fieldList.FirstOrDefault (M = & gt; m.primaryItem == info.Name) for; } How can I stop Linq to use my resultset every time ... Thank you for your help! FirstOver Default () is an example of a method that calculates on the result (the first result should be found). You want to call a method or otherwise calculate the results once. This way, when you want to refer to those results throughout y...

android - How to setup NDK in eclipse Juno in ubuntu? -

Image
I am installing Android NDK, but it is not happening as many sources have said that the use of links A new software will be installed by an NDK plugin option but when I am doing this, it is not being displayed. You must install the developer tool on the link that you showed, https: // dl-ssl. Google.com/android/eclipse/ Then you need to manually download the NDC for your platform by visiting and clicking the right version. https://developer.android.com/tools/sdk/ndk/index.html Then you Preferences / Android / NdK and you've ever downloaded the NDK folder to where the path is placed. So if you put the desktop on the desktop then just click I just mentioned that, and browse through the options which click on the folder, then click on the open button and it will be found. If you open the folder it will appear in the next directory. Super annoying tell me that you need more help.

How to create straight forward Singleton classes in Objective C? -

I am used for java and currently it is written on Objective-C . Actually I will create java in the singleton sections: public class singletonclass {personal stationary example; // Step 1 Public stable singleton class getInstance () {// Step 2 if (example == zero) Example = New Singleton (); Return example; }} very straightforward? But I find it a difficult time for which to make a straight forward solution in objective-c I did this: @implementation SingletonClass () {// Here I want to do step 1 which is to create a static example; // It is said that the private variable has been declared here; * SingletonClass * example; // is said that the stable keyword is different here} // so i have to do something like step 2 + (id) getInstance {if (example == zero) example = self; Return example; } @end The problem is that there is an error: does not allow the type name to specify the storage class Use sender_OCI_T : The Sender_once () function from App...

jquery ajax sending same request through a loop? -

Is it possible to send a single post request through AJAX using a .post () in a loop? Say I have an array, and in this I would like to send a request for a post such as update, remove from database. Yes, it is possible, you can do CN something like that, yourArrayObj.forEach (function (singles) {$ ajax.post ('/ your_url', request data, success callback, error breakback);});

java - Send an upload in chunks to avoid OutOfMemoryError with httpclient 3.1 and URLConnection -

I am trying to send a file using an IIS server using apache commons httpclient 3.1, but I get a memory error Coming out / P> InputStream = FileService.getInputStream (filename, FileService.HDD); BytereonOutOperputStream FileUpload = New Bytereanputstream (); Byterepartsource file = null; Try {byte [] buffer = new byte [1024]; For (Int Lennon; (Lane = Reid (buffer))! = -1;) fileToUpload.write (buffer, 0, lane); File = new byte array source (filename, fileToUpload.toByteArray ()); Post.setContentChunked (wrong); Part [] part = new part [] {new file page (filename, file)}; Post.setRequestEntity (New Multilateral Request (Part, Post. GetParams ()); } Hold (OutofMemory Irrore E) {} Finally {try {if (=! =) Is.close (); If (fileToUpload! = Null) fileToUpload.close (); } Hold (IOException E) {}} OutOfMemoryError fileToUpload.toByteArray happens on (). What is a way to send fragmentation to a file? I can not use the file object because I get permission errors. I have also tried wi...

Highcharts: Percentage stacking bar chart with overlayed line graph (secondary axis) -

I am trying to create a double axis highchart on an axis, I want a cent stacked bar chart, and on the second axis I A line chart should be, however I'm close to (I have a 'normal' stacked bar chart which is overlapped with the line chart), even after stacking the percentage as a 'percent' Not stack in the form Can What do I have here: $ (function () {$ ('# container'). High Chart ({chart: {type: 'column', width : 550, height: {}: Title: {text: 'percent'}}, {min: 400}, Title: {text: 'title'}, xAxis: {categories: [1, 2, 3]}, yAxis : [[Min: 0, title: 0, Opposite: right, title: {text: 'Total Count', Style: {color: Highcharts.getOptions}. Colors [4]}}, Labels: {Style: {color : Highchart auction. Color [4]}},}], Tooltip: {pointFormat: '& lt; span style = "color: {series.color}" & gt; {series.name} & lt; / Span & gt;: & lt; b & gt; {point.y} & lt; / p & gt; ({Point.percentage: .0...

python - Why isn't my variable in a list behaving the way I expect it to? -

I am trying to create a simple animation in Python using a python that runs on a block screen. I am involved in the relevant parts of the code (what do I think). x, y = 1, 1 while true: rwidth, rheight = 10, 10 left, top = x - (ravith / 2), y - (rheight / 2) myRect = left, Up, rwd, right pagam Draw (Screen, white, myrrct) position = [x, y] speed = [5, 5] position [0] + = velocity [0] what is the block , Where it is supposed to be, but it does not move. However, if I change the position with [0] + = velocity [0] with x + = velocity [0] , then it does what I want. What I think, the situation [0] and x should mean the same thing, why is not it working? This is due to the fact that you are using values ​​ X and y to draw the block and not the position [0] or position [1] . When you are updating the status values, the variables remain x and y (see your code). Therefore, for the time the status does not serve any purpose in your program, except that it is...

java - Running a .jar file without a GUI -

I have created this small program for the project on which I am working, and it works as if What I would like to do with Eclipse is a .jar file that I can double click and run it in my console. I was exported alaradi as a jar and a runner jar on the export menu, and both The time it takes to launch Java process in Task Manager Nc is, it uses both the CPU and memory, but does not show anything on my screen. I tried to compile with a command prompt, and this is only one thing, so my question is, can I apply a Java application without GUI? Because I think my problem is: I followed a tutorial to create a program, and it worked fine. I am using Windows 8 64-bit (I'm due to some other software I'll have to use on my project). I am a newbie in this Java shopping, so if you please keep it as simple as possible; I really appreciate it. thank you in advanced. Import java.util.Scanner; Public category dutasia {public stationary zero main (string [] args) {scanner sc = new scanner...

selenium - issue accessing a text using xpath -

I have difficulty'm trying to find acceptance in the html and it is I, I tried: // td [* / text () = 'acceptance'] // td [including (@class, 'sanctions ')] Any help would be appreciated & lt; td class = "ThemeGrayMainItem" name = "cmSubMenuID4" onmouseup = "cmItemMouseUp (this, 1, 'cmSubMenuID4', 0,32)" onmouseout = "cmItemMouseOut (this, 1, 'cmSubMenuID4', 0,32)" onmousedown = " cmItemMouseDown (this, 1, 'cmSubMenuID4', 0,32) "onmouseover =" cmItemMouseOverOpenSub (this, 1, 'cmSubMenuID4', 0,32) "& gt; Approval & amp; Nbsp; & Lt; / TD & gt; You can use () : // TD [included (. 'Approvals')] Where . indicates the text of the element. If you have additional investigations, for example, can apply on the class name: // td [@ class = 'ThemeGrayMainItem' and (. ' Acceptance ']]

xmppframework - Getting an error in libxml library in ios -

I am working on chat application in iOS. When I integrate the XMPP framework in my app, I am getting an error, in the libxml library. Can you please help me out? Please see the following screenshot follow these steps Code> Security.Firework , Core Graphics. Framework , foundation.freework , uiKit .framework , libxml2.tbd , cfnetwork.frameWork , libresolv.tbd , CoreData.frameWork , systemConfig .framework , and yes and user header search path: CoreLocation.frameWork in the listed framework and library $ (SDKROOT) / Usr / include / libxml2 it recurse Add header search path: $ (SDKROOT) / usr / include / libxml2 this non-recursive Search the Other Linker flag and add: -lxml2 . Now clean project and construction for IPA

cordova - Phonegap volume control(get volume) -

PhoneGrap is a set volume for the Media API. Now I would like to know that there is a way to get Volmume (). This is no luck. I have only got the set volume () with PhoneGap Media. I think from this point, I may have to create a new plugin for this. Thanks As far as I know setVolume does not change the amount of device it just controls the media sound Assuming that the device sound is adjusted from 50 to 100. Then the media is considering the plugin 50, not the total 100. This will divide the available volume into the 0 to 1.0 scale. In the beginning it will be 1.0 by default so if you change it in something that you already know. You do not need a gate volume. Hope I made it clear.

Which is faster: manual processing of a single query in Java or doing multiple selects in SQL Server? -

Which should be faster? 1) Selecting on a SQL server three times and then adding the result to array lists on Java, SQL Server Count from the table (1) Select where somecriteria = "true"; - stmt1 selection count (1) From the table where somecriteria = "false"; - Select count from STMT2 table (1); - stmt3, values ​​are either true or false Java ResultSet rs1 = stmt1.executeQuery (); Whereas (rs1.next ()) {arrayList1.add (someKeyGeneratingMethod1 ()); } Results set rs2 = stmt2.executeQuery (); While (rs2.next ()) {arrayList2.add (someKeyGeneratingMethod2 ()); } Results set rs3 = stmt3.executeQuery (); While (rs3.next ()) {arrayList3.add (someKeyGeneratingMethod3 ()); } Or, 2) Is it time to choose to use SQL Server and then processing results in array lists on Java? SQL Server Select the number from the table (1); - STMT, values ​​are either true or false Java ResultSet rs = stmt.executeQuery (); While (rsnext ()) {string x = rs.getString...

php - Form submit supposed to refresh only Div, but instead refreshes Page -

I have a PHP page called 'leguastas.fp'. This page allows the user to post a message / status update and is intended to refresh only this part of the intention; However, upon submission, the whole page is reloaded. In the current implementation, I am simply printing all the $ _ POST variables in the div so that I can see what is going on. MsgText textarea is posted, however, it is only after the full page load I am just trying to get the div and the file is included to reload it. div id = "statusupdates" & gt; & Lt;? Include 'leaguestatus.php'; ? & Gt; & Lt; / Div & gt; leaguestatus.php & lt; Form ID = "Statusform" method = "Post" & gt; & Lt; Textera Name = MsgText Rows = 5 Columns = 40 & gt; & Lt; / Textarea & gt; & Lt; Br> & Lt; Input type = submit value = post id = uhsbutton> & Lt; / Form & gt; & Lt; BR & gt; & Lt; BR & gt; & Lt; Di...

node.js - Gruntjs with grunt-nodemon, watch and jshint -

I'm trying to run GruntJS with those 3 plugins so that these changes and the first To see: Lint the file and then reload the Express server My problem with the configuration given below is that if jshint lint file does not run nodemon and its Adverse. // Gruntfile .js // Our wrapper function (required by the bell and its plugin) // All the configuration module inside this function. Exports = function (grunt) {// ========================================= ================================== CONFIGURE GRUNT ============= ================================================== ================================================== ====================== Strength .initConfig ({// Get package information from package.Jason ------------- --------------- // In this way we can use things like name and version (pkg.name) pkg: grunt.file.readJSON ('package.json'), // All our configurations go here // Configure jshint to validate jsint file --------- ---------------------- ---- jshi...

c++ - Curious "void*" parameter on some GL functions -

For some functions in OpenGL, someone has to specify a byte offset, such as glVertexAttribPointer () For the first time, I would have guessed that it would be a normal number value like integer. But upon inspection, I realized that it needs to be inserted in zero * (more specifically GLvoid * ). My question is, what is the intention of zero * and why it should be used for offset bytes? GlvetexAttribPointer () is an old function before the Vertex buffer object. Before VBO your top data will be stored in the client side array and before you draw, OpenGL will have to pass a pointer in the data. When VBO came along, they repurposed this function by allowing the function to be used to pass the integer offset. For example zero * offset = (zero *) offscot (vertextstructname, vertexembar_name);

java - createSQLQuery in hibernate uses Prepared Statement? -

I createSQLQuery and setString (no hard-coded values) I'm using) in Hibernate I want to know that Hibernate has to be used in created condition for createSQLQuery ? Concern: I want to preserve the execution plan created by this query in the cache, so the next query will be sent to the database next time Given, it will use the same execution plan. FYI: I'm using MSSQL Server 2008 / * This is just an example I'm not using the same question Am * / Query nativeSQLQuery = session.createSQLQuery ("user_master before name select where user_name =: param"); NativeSQLQuery.setString ("Ultimate", "vicky.thakor"); I can not even get in the Stackworflow link or Google, please provide me a link. I've tried to use Skyuelacli method for making hibernates to a query, then I will the exceptions below: - on sqlQueryDirect com.mysql.jdbc.ConnectionImpl.execSQL (ConnectionImpl.java:2568) on com.mysql.jdbc.MysqlIO (MysqlIO.jav...

java - timestamp string split to get date and time effective way -

1) Regular expressions, using pattern 2) Using string split function in class I tried to use the split function, I think it is not a good coding practice using splitted such '_' iterative array input string strings START_READING_20140723_093539.jpg Description_20140723_093539.jpg Qunantity_20140723_183539.jpg END_READING_20140723_093539 JPG is the input format: yyyyMMdd_HHmmss The output format is: 23-07-2014 06:35:39 ? Why not import joda.time.format * for the whole thing. Import joda.time *; DateTimeFormatter inputFormat = DateTimeFormat.forPattern ("YYYYMMDD '_' HHmmss'); Local Datetime Timestamp = Input Format. Parcelocalditis (the string); DateTimeFormatter outputFormat = DateTimeFormat.forPattern ("dd '-' mm '-' yyyy '' hh ':' mm ':' Sarva Shiksha Abhiyan '); String output = output format.print (timestamp); If you are using Java 8, you should use the Java Time Package ...

javascript - Delete record animation isn't working with dialog-confirm -

OK, what I have is an Ajax delete record. I jquery dialog-confirmation instead of using javascript confirmation Have tried to add. The deletion function works, but the problem is that the removal line animation was not working. What I have now here Any help would be appreciated ($ line = $ result-> fetch_assoc ()) {echo & lt; Tr class = " Php record" & gt; '; Echo '& lt; TD & gt; $ I ++ ' & Lt ;. / Td> & Lt; Td align = "center" & gt; & Lt; A href = "#" name = "'. $ Line [" counter "].', '$ Row [idas]].'" Class = "delbuttons" & Gt; & Lt; Img src = "images / del.png" range = "0" width = "10" height = "10" title = "delete" & gt; & Lt; / A & gt; & Lt; / Td> & Lt; TR & gt; Jquery / Ajax $ (". Delbuttons"). Click (function () {//e.preventDefault (); va...

android - More than one registerForContextMenu(View v) handling -

I have 4 * 7 tables and I want to handle every edited text there, when the user is on the 5th edited text Clicks for a long time enough that the menu pop up can choose what color he wants. The problem is that how should I do this, I have 4 * 7 editors, so I should call the RegisterForrentaxMenu (View) 28 times I have done so that I can choose it from the cantext item Am (menu system)? I do not want to see the whole section of the scene when the user clicks on any situation for a long time, the menu will pop up, so I do not want to do this. Edit: I tried to do it in the KreteContext menu: if (v.getId () == R.id. Table_item1) {condition = 1; } and check the status in onContextItemSelected, is there a better way / faster way to do this? Since I will need 28 there: ( You can edit your EditTexts , edit1, Edit2, edit3 etc. Then you can do a loop for (int i = 1; i & lt; = 28; ++ i) {int resId = getResources.getIdentifier "edited Do "+ i," id ...

r - axis break/gap with error bars -

Image
There are easy ways to create a break / gap plot of the axis, to create a brake / gap plot of an axis with error bars Is an easy easy way? (I only know Fidelly methods) # install.packages ("PlotTricks", Dependency = TRUE) is required (PlotTricks) x errorbar & Lt; - Function (x, y, error, width) {x0 = x; Y0 = (y-err) x1 = x; Y1 = (y + err) arrows (x0, y0, x1, y1, code = 3, angle = 90, length = width)} err & lt; - Representative (1,20) plot (X, Y) errorbar (X, Y, gal, 0.05) I will suggest a solution where you put it on the logarithmic scale. This way (see below for code). On the left side there is a logarithmic scale and on the right is a standard linear scale to compare. # install Package ("ggplot2", Dependency = TRUE) is required (ggplot2) #Data (MTCAR) # If you call it net `mtcars` mtcars $ cyl2 & lt; - Ifelse (mtcars $ cyl> 10x cylinders 10 Mtrr mpg [MTCARS $ CIL2 == 'B'] for C ('A'), C ('B') # B...

Handling screen dim/screen lock in android wear -

I have a thread running on one activity. And the thread is stopped when the screen is closed (in the emulsifier when you click on the power button and lock the screen). How to handle this scenario? Will 'Wakelock' help? If so, how to deal with it? This is your problem that you have an activity UI thread running in the Java thread It is not good for me either I will start the thread and it will be linked to using the daemon thread, and it will have to be referenced in a custom application class or have to make the service instead. Burning the thread with something like this: Enhances the public class main applications application {Private thread of your thread; @ Override Public Empty on Create () {Super. Connet (); this. Thread = new thread (this); This.thread.setDaemon (true); This.thread.start (); }}

python - How to write the map sentence here to call array to calculate with ThreadPool module? -

I want to practice with module Threadpool, so that each element can add a category (1, 1,100). Multiprocessing.pool import ThreadPool array = range (1,100) class test (): def myadd (self, x): return (x + 2) do = ThreadPool (5) do.map (test.myadd, array ) Tracebacks (Lastest Call Last): File "& lt; stdin>", Line 1, & lt; Module & gt; The file "D: \ Python34 \ lib \ multiprocessing \ pool.py", line 255, back to the map itself. _map_async (funk, iterable, mapstar, cholexise) .get () file "D: \ Python34 \ lib \ multiprocessing \ pool .py", line 594, self-lifting ._value TypeError: Exception should be obtained by basexception & gt; & Gt; & Gt; Do.map (test.myadd (array), array) traceback (most recent call final): file "& lt; stdin>", line 1, & lt; Module & gt; Name error: the name 'self' is not defined & gt; & Gt; & Gt; Do.map (test.myadd (), array) traceback (most recent call final): ...

SapUI5 - Add own data to a Tile? -

I'm trying to create a sample application that will display data from a JSN file. For this, I want to use tiles to display each item in the Jason file. This is the following data in my JSN file: {"item": [{"id": "item1", "des": "all types of books!", "Content": "UK", "copy": "ui5consumption@sap.com", "price": "flat 50:" These deals are too big to be public, save 50% or more in your hotel booking! True, "{ID}:" Item 2 "," DES ":" Branded! "," Content "is true," PIMNEY "recommended deals: incredible" "," unread ": true," important " "Id": "id": "item 3": false "id": "walts", "to": "ui5consumption@sap.com", "value": "closed up to 50%!", "Unread" , "DES": "The most famous wr...

php - How to redirect query string with dash url using htaccess -

how to redirect I have tried all possible solutions but it is not redirected. How do I get it? Thank you in advance This rule checks for a query string on htaccess coooblog And Redirect Coblog / Redirects Rewind condom% {QUERY_STRING} ^ (. *) $ RewriteRule ^ ceoblog (/?) $ / Ceoblog /? [R = 301, L] However, by looking at the query string, this will stop the endorsement and tag filter from working properly - that means you will be with only one page.

jquery - replace all specific unicode characters in a string -

मुझे सभी विशिष्ट यूनिकोड वर्णों को प्रतिस्थापन के साथ एक स्ट्रिंग से बदलने की आवश्यकता है। उदाहरण के लिए: & lt; div class = 'linkL' & gt; ČAŠA ŽEĐ ŽUČ & lt; / div & gt; $ ("। LinkL") क्लिक करें (फ़ंक्शन () {var a = $ (this) .html (); var b = a.replace (...); // सभी उदाहरणों को प्रतिस्थापित करते हैं, Ć, Ž। एस, सी, सी, जेड, एस के साथ सतर्क (बी);}); सतर्क होना चाहिए CASA-ZED-ZUC यह एक सामान्य समस्या है (मेरे ज्ञान से) कोई प्रत्यक्ष समाधान नहीं है आमतौर पर मैं इस तरह से कुछ फ़ंक्शन का उपयोग करता हूं: & lt; script & gt; $ ("। LinkL") क्लिक करें (फ़ंक्शन () {var a = $ (this) .html (); var b = removeAccents (a) अलर्ट (b);}); फ़ंक्शन निकालेंएक्सेंट्स (एआरसी) {var find, re; Var a = ['À', 'ए', 'एक', 'एक', 'ए', 'ए', 'एआई', 'सी', 'È', 'ए', 'Ê', 'Ë ',' Ì ',' Í ',' Î ',' Ï ',' Ð ',' Ñ ...

c++ - Reading data cv::Mat -

I'm looking for a better way to get data from a cv :: Mat 32F3C . It was using: Vec3f c1 = _image.at This works fine, but not too early, I noticed that this method is better: Vec3f c1 (_image.data [step [0] * i + step [1] ] * J + 0], _ image.data [step [0] * i + step [1] * j + 1], _ image data [step [0] * i + phase [1] * j + 2]) ; It is compiled but this is not correct, I also tried: Vec3f c1 (_image.data [step * i + channels * j + 0], _image.data [step * i + channel * j + 1], _ image.data [step * i + channel * j + 2]); But the only thing is, it compiles, but gives me another absurd result. I should be reminded of one factor or something. Thank you! You can find useful in OpenCV-documentation. However, I will first write the code which is easy to understand, and only optimizes it, if it becomes clear that I have to customize exactly that portion of the source code. The summary of the article is that there are three ways to access the pixels: On-the...

javascript - jQuery wrap the selected markup with proper closing and ending tags -

मेरे पास ऐसा मार्कअप है। & lt; ul class = "language-dropdown "& gt; & Lt; li वर्ग = "lang-switch language_en current_lang" & gt; & Lt; a href = "#" & gt; & Lt; img src = "res / flags / en.png" alt = "एन" & gt; & Lt; / a & gt; & Lt; / li & gt; & Lt; li वर्ग = "लैंग-स्विच भाषा_इस" & gt; & Lt; a href = "#" & gt; & Lt; img src = "res / flags / es.png" alt = "es" & gt; & Lt; / a & gt; & Lt; / li & gt; & Lt; li वर्ग = "लैंग-स्विच भाषा_डे" & gt; & Lt; a href = "#" & gt; & Lt; img src = "res / flags / de.png" alt = "de" & gt; & Lt; / a & gt; & Lt; / li & gt; & Lt; li वर्ग = "लैंग-स्विच भाषा_जा" & gt; & Lt; a href = "#" & gt; & Lt; img src = "res / flags / ja.png" alt = "ja" ...

testing - Spring MVC Controller Test -

I am writing a JUnit test case for a spring controller. The controller class Junit test case and MockHttpServletRequest and MockHttpServletResponse. The problem is that I can not find the body (i.e. the list of train items in the transcript). Can anyone help on this? @controller @ request mapping ("/ trains") Public Class Train Controller {@Autowired Private TrainService trainService; @RequestMapping ("trainslist.json") public @ResponseBody list & lt; Train & gt; GetTrainList () {return trainService.getAllTrains (); }} The Junich Test Case Package for the above Controller class is com.xvitcoder.angualrspringapp.controller; Static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get Import; Import static org.springframework.test.web.servlet.result.MockMvcResultHandlers; Print; Import static organization. Import java.util.ArrayList; Import java.util.list; Import org.junit.Before; Import org.junit.Test; Import org.junit.runner.RunWith; ...

Wrong unicode characters representation in Python 3.4 and py2exe-3 -

I have a problem with the Unicode string in the frozen app. I use Python 3.4.1 32bit (Windows 7 64bit Pro) and I can display it with the following code: #! / Usr / bin / python3 # - * - coding: UTF-8 - * - # file: test_py2exe.py import SYS my_string = u "" "This is a test: end of ABC exam ..." "file name = 'Test.txt' if the gateetter (system, 'frozen', fail): file name = 'test-frozen.txt' f = open (file name (Py test_py2exe.py) If I open a standard python (py test_py2exe.py) , The second line in Test.txt is like this (true): ábc If I py -3.4 -m To run Pyroxe.build_exe test_py2exe.py and 'dist \ test_py2exe.exe' with frozen apps, I have such a kind Test-FrozenTax is the second row: Ăbc This problem is not related to simply storing wires to file, but when I use Unicode string With the use of other modules (for example, PEext 5, XLSORIeter), the following instructions are not helpful ... Is this a solution? ...

extjs - Check array for equals elements -

Hello, I have an array, and when I check this array for the same elements, I'll click on the button and if all the elements are equal function (button) {var win = button.up ('window' ), Grid = win.down ('grid'), value = []; Console.log (value)}}} / pre> and example status: if (equals elements? Is it?) {Some functions} and nothing else; Contains, use the equal method Does a shallow comparison. if (Ext.Aray.equals ([1, 2, 3], [1, 2, 3])) {// do something}

php - Load xml gzipped from external link -

I need to load jeeped XML from an external link, but I do not know how to do this. Now I am loading this XML file on my server and then I convert the XML address into a variable every 3 days. The code I am now using to load XML is: $ xmlFile = New SimpleXMlelement ('xml / abcd_201407281213_12074_28203833.xml', 0, true ); I found a link to download XML files from their server: http://nameofthewebsite.com/folder/28203833C78648187 Xml? Ticket = BA57F0D9FF910FE4DB517F4EC1A275A2 & amp; GZipCompress = yes Can someone help me?

sql - Crosstab query does not work in Excel, but works in Access -

I have a problem that drives me crazy. I have SQL query: Select the format [[Meetings]] [Date of meeting], 'MMM as the Transformment slurry (Meetings. [ID]) (Meetings) [meeting]], meeting (meeting)], draft ([meetings] [meeting date], 'mum') by month ([meeting] [date of meeting] by order, year (meeting) Meetings [date of meeting] PIVOT years (meetings. [Date of meeting]); It works well in access, but when I execute it from Excel, I do not get any records. Opening the recordets part is 100% correct, because it works fine with other queries Does anyone know why a record receives? If you want to import crosstab queries in Excel, access requires you to jump through some hoops is. Crosstab can not be prepared by Excel, so you should create your own crosseset query in Access Create a create table query that is just Select from your cross tabs in StaticCross tab * Go back to Excel and import your data as Like a pain, but this is the best way to acce...