Posts

Showing posts from April, 2015

requirejs - Typescript AMD external module loading, angular is not defined -

I know that there are already some similar questions on this topic, but none of them helped. I want to use angular.js in a project which uses requirejs and typescript. I have a module, where I use angle to create a service module: // / & lt; Reference path = "../../../ typing / angels / angel dat" /> ... var services = angular Modules ('Services', []); ... Export = Services; This code compiled with Oath error, but in the built JS file, there are angular. JS dependency: define ("," export "], function (required, export) {...} and when I run the application, then the browser complains: Unfair reference references: angular is not defined My guess is that in any way I should import angular besides referring to it, but the way I Tried to work, he is not anybody. Here it is necessary, if its Required. P> needed.config ({Path: {angular: '../lib/angular/angular', ...}, Shim: {angular: {Export: Angular '}, ...}}}

javascript - Three.js create texture from image file -

I have a problem, in which three from the image file I have a function to make mesh that looks like this: var image = document.createElement ('img'); Image.src = imageFile; Var Textures = New Three Mix (image); Var mat = new three. Mashfong content (); Mat.map = Texture; Var Aries = New Three. Aries (new three. Plain gemetry (20, 20), mat); Var plane = trap; Plane.position.x = 0; Scene.add (aircraft); However, my texture provides black color and the image does not appear to render properly. The easiest way to use the image in the form of texture is to call it three. IJU Utill. Loads using loads (URL, mapping, onload, on error) , here is an example: var mesh = new three. Aries (New three.PlanGometry (1, 1, 1, 1), new three.Messbaceic content ({map: three image imit.load texture ('/ my-image .jpg')})); Three. Constructor accepts an image as its first parameter, I think the problem you are experiencing is because you are not waiting for the image to compl

regex - Include AlphaNumeric, but Don't Match a Particular Word -

मैं Regex के लिए कैसे लिख सकता हूँ: बराबर FOO के बराबर > एक या एक से अधिक बार, लेकिन नहीं < / Blockquote> मैंने निम्न वर्णों में से किसी को बाहर करने के लिए ^ को देखा है, जैसे "एक्सवायज़ वगळा": scala & gt; वैल ब्लॉक XYZ = "" "[^ XYZ] +" ""। आर ब्लॉक XYZ: scala.util.matching.Regex = [^ XYZ] + स्कला & gt; "XXXX"। मैचों (ब्लॉक XYZ.toString) res26: बूलियन = गलत स्केला & gt; "एएए"। मैचों (ब्लॉक XYZ.toString) res27: बूलियन = सच स्केल & gt; "एएएएसीए"। मैचों (ब्लॉकएक्सएड। स्ट्रॉस्टिंग) res28: बूलियन = झूठी लेकिन, मुझे पूरा यकीन है कि कैसे नहीं एक पूर्ण शब्द और अल्फ़ान्यूमेरिक वर्णों पर मेल करें आपको अपने regex में नकारात्मक लुकआहेड ​​का उपयोग करने की आवश्यकता है: < / P> ^ (?! FOO $) [0- 9 ए-जेड] + $ ($? FOO $) साधन [0- 9 ए-जेड] + निम्न इनपुट से मेल नहीं खाती हैं, अगर यह इनपुट के अंत में FOO है।

ruby on rails - undefined method `valid?' testing with FactoryGirl -

I am the simplest test at the following class (inside model folder): Class Offer Attr_accessor: Title ,: Payout ,: Thumbnail Def initial (title, payment, thumbnail) @ title = title @ payout = payout @ thumbnail = thumbnail ending end this is not it 'Offer' DB table Objects created outside this square are never saved in a database. Then I test using rspec: Offer a description "There is a valid factory" Hopefully (Factory Gear Cachelet (offer :)) should be authorized End ... end and factorial: FactoryGear.Define factory: Offer Skip_create title {Faker :: Name.name} payout { Faker :: Number.number (2)} Thumbnail {Faker :: Internet.url} initialize_with {new (title, payout, thumbnail)} end and and I get the following error: & gt; Undefined method `valid? '# & Lt; For Proposal: 0x00000002b78958 & gt; Because your offer category activacikord :: base , you can not find anything that comes with it (like legalization). Is val

c++ - Client(cocos2d-x) <-> Server(php) How to send Server Data back to Cleint? -

I am developing some stuff with Cocos 2D-X and my webserver. My goal is to send my server (PHP) to the mobile device (iphone, cocos 2d-x) and back to the mobile device. My idea is to do this with CCTPTLent, but how can I get it from my server? Device -> HTTP Client -> Data Methode "Post" -> Server, deal with data and send to wolves "X" back Then how can I send anything back Am I Best regards PS: I am German, sorry for some English-mistakes XD I think you should only echo json_encode ($ data); Go out; Try it.

php - omnipay array of products -

Hello guys, I am working with omnipay in larval and I want to know how can I change the code to show in PayPal? Get the total number and item of each item $ response = $ gateway-> Purchase (Array ('cancelURL' = & gt; $ keys- & gt; getCancelUrl ()), 'returnURL' = & gt; get- $$-> getReturnUrl (), 'Description' = & gt; Cart :: Content (), 'Zodiac' = 'gt; 200.00', 'currency' = & gt; $ keys- getCurrency ())) - & gt; Send (); & Lt; / I & gt; I have never used Omnipe, the way I walked around And what I found is that you are searching on a class at GitHub. $ purchase = $ gateway-> Purchase (array ('currency' = & gt; 'GBP', 'transaction reference' = & gt; 'array (array (' name '= & gt; 10,' value '=>' 5.00 ', 'Description' = & gt; 'Reference ID1', 'clientIp' => '95.87.212.88 ',' item 

java - Determine how many times IME_ACTION_GO is pressed -

I am trying to run a method when the login button is pressed 1 time. If it is pressed 2 or more times, I do not want to run the method, and I want to do RawInputType and / or IMEOptions To return to the normal button functionality, go back. How do I get this function? My code so far public int press = 0; BodyText.setRawInputType (InputType.TYPE_CLASS_TEXT); BodyText.setImeOptions (KeyEvent.KEYCODE_ENTER); BodyText.setOnEditorActionListener (New TextView.OnEditorActionListener) {Public Boolean onEditorAction (TextView V, Integer actionId, KeyEvent event) {if (actionId == KeyEvent.KEYCODE_ENTER} {if (press == 0) {press + = 1; // Play "method"} if (press & gt; = 1) {// "never run" method} back true;} return false;}}); It seems that your code is almost but it seems that you are not returning right What is the matter, which is consuming this phenomenon, which means that the default functionality will not run after press 0. You will only wan

sql server - Adding and multiplying tables' data by values in another table -

Say I have a table of sort lines and divisions according to the date: tblFactors dt Sub Divide 2014-07-01 1 1 2014-06-01 0 5 2014-05-01 2 1 2014-05-01 0 3 I have one of the ordered values ​​according to the date And the essence is: tblValues ​​DT Val 2014-07-05 4 2014-06-15 5 2014-05-15 21 2014-04-14 31 2014-03-15 71 < / Code> I need to do some sequential calculation for the first value in I tblFactors , I would have to deduct 1 from each val where tblValues.dt & lt; '2014-07-01'. Next, I need to process the second row in tblFactors I subtract nothing. However, divided = 5 means that I Each val needs to be divided by 5 where tblValues.dt & lt; '2014-06-01'. The hard thing is that I need to split it on the modified wall (not the 20/5, 21/5) from the first row. Void subtraction 1 divided by 5 minus 2 divide 3 7/5/2014 4 6 / 15/2014 5 4/15/15 21 21 4 4/14/2014 31 30 6 4 3/25/2014 71 70 14 12 4 This will leave me: qry

Installing Spring ToolSuite in Eclipse -

I'm starting to develop webpages using the Spring framework, I know I have to use the Spring Tools Suite I went to the Eclipse site to download, but I did not know about the four types of downloads suggested in the page below. I'm having trouble knowing, even then none of them seem to spring in their facilities Ha? / P> Any help? Just for your consideration I wrote the following tutorials about STS Installing Spring Equipment Suite Configuring Apache Maven Getting Started: IDE & amp; Projects Configuring the Java Working Set Workspace Structuring A complete and more detailed tutorial, available here:

Android how to measure time (few days) in app -

Sorry, if the title is confusing, then I will explain: I am creating an app that registers the user's action , Writes it as a string in the form of a database (eg, 17 July 2014 17:45), and then, when the first entry is made, then I have to measure 3 days, so when it lasts 3 days , Then I will ask the user to do something. How can I do this? You should use Unix and make it long . Long time = System TimeTimilis (); 3 day difference: Boolean ish daydaily (long time saved time) {if (SystemCurrenttime milliseconds) - saved time> 1000 * 3600 * 24 * 3) back true; return false; } edit value corrected

ios - Link error: unknown option character `X' in: -Xlinker -

results in error under the following linker command. Are being made to build the simulator target in XCode for IOS it is not clear that the logic of Xlinker through Xcink. How i here /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool static -arch_only i386 -syslibroot any ideas on how we can pursue a solution / Applications /Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk -Xlinker -sectcreate -Xlinker __TEXT -Xlinker __entitlements -o libxxx.a error: / Applications /Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: unknown option character `X ': -Xlinker (note: it appears this is The error happens from somewhere. The same project file was created exactly the day before). use_frameworks! Install pod to make your Podfile and run. That is why the issue should be resolved.

python - Calling plt.table for a matrix but getting weird plot -

Image
I have a matrix that I want to output information to a plot and not imshow like a color diagram is. I have the following code: plt.table (cellText = correlation_mat, loc = 'center', colwidths = np.ones (correlation_mat.shape [0]) / Correlation_mat .shape [0], cellLoc = 'center', bbox = [0,1,1,1]) This displays the following: How can I fix it in output numbers? They are there, but they are small, so I The need to increase the font size using the table = Plt.table (...) and table.set_fontsize (25) Using

ember.js - Handling network connectivity and promise rejections in Ember -

I am trying to implement an application-level error handler to catch unsuccessful promises in my application. The suggestions I have seen around this have to do with error logging, but I really want to trigger a model window so that my users can know that they are no longer connected to the internet + just read data You can. I RSVP The only way I have managed to do this is to: Start the attacker inside the panic handler, in this way: Amber. RSVP. Configure ('panic', function (e) {window.App.__container__.lookup ('Controller: Application'). Send ('showdown', 'disconnect');}); But it seems a bit hack for me. Is writing this code more suitable? More generally, is there a best practice to inform users of lost internet connections? Amber has a built-in. Depending on the type of errors in your app, you can add view / error.js and depending on how you want to manage it, and in that view, willInsertElement < / Code> can run a meth

JavaFX and Clojure: binding observables to immutable objects -

I'm trying to figure out the approach to allow a JavaFX TableView (or some other JavaFX talk) Closer allows data, and allows the user to manipulate data via GUI. For this discussion, suppose I have a list / vector, such as [{: col1 "happy1": Col2 "sad1"} {: col1 "happy2": col2 " Sad2 "}] and I want to display it in a graphical table: mykey1 mykey2 - ----------------- Happy 1 sad1 happy2 sad2 Beautifully it has been a ghazalian times in the history of the world. The problem is that Tableview emphasizes on taking an Observatory List, etc., which is inherently an inefficient thing, as in Java FX all the Observables. It's great to keep the table up to date, and in a temporary model, it's great to allow a user to manipulate data directly through the GUI. I am not an expert, but in this case it seems that JavaFX wants the GUI object to actually contain the actual data. It looks strange (no ha ha) to keep my own model and to

ruby on rails - Compass integration in Intellij Idea 13 via grunt console -

Image
I have a problem running through hard work from intellij idea 13.1.4 < Strong> Environment: OS: Ubuntu 14.04 64bit 0.10 in node.js: /home/lido/.nvm/v0.10.29/ 29 bin / node (via NVM) Ruby on Rail: 2.18 in /home/lido/.rvm/rubies/ruby-2.1.2/bin/ruby (via rvm) Compass: 0.12.7 in /home/lido/.rvm/gems/ruby-2.1.2/bin/compass If all tests to run Use the IDE and select the exam suffocation & amp; Karma receives a warning: WARNING: Moving "compass: dist" (compass) function Warning: 'compass' binary could not be found. Make sure it is installed and in your $ path to continue - use force aborted due to warnings. I have shell and all functions Normally, I can make complicated calls through, not only in IntelInt consideration If I enable compass support in the Intelligence setting then I have entered the "/ home / lido / .rvm / gems / ruby-2.1.2 / bin / compass" executable file as executable file I nevertheless IDE tells me: "

python - percentiles from counts of values -

I want to calculate in Python with a detachment of multiple large vectors. Instead of adding vectors and then trying to insert the resulting vector, is there a more efficient way? My idea will be first, the frequency of different values ​​(using the example), secondly, combining those item frequencies for different vectors, and finally, calculations of counterparts from calculations. Unfortunately I can not find the function for the combination of frequency tables (this is not very easy, because different tables can cover different items), or calculate antithesis from an item frequency table. for. Do I need to implement them, or can I use existing Python functions? What will happen to those tasks? Using the collections.Counter to resolve the problem first ( Calculation of the calculation and frequency tables) After the suggestion of Julian Palard, and my implementation for the second problem (Calculation of percentage from frequency tables): Import countercf calc_perc

Liferay application adapter does not work with javascript files -

I need to use an application adapter to apply different functionality for different sites. If I set the "false" delay-hook in MML, and choose the appropriate adapter in the 'FAAER site settings', all modifiers that are displayed in jsp files , but JS There are no modified files How to use ADIF adapter to customize JS files on each site? Thank you very much for your reply. You can not do this by the way an application adapter fixes the application server JSPs - while JS Files are requested directly from the browser. As JS files are usually reduced by any assumption of different files due to the site, you need to make your JS files aware of the conditions in which they move - eg . Start conditional initialization in them or embed different JS files in your subjects (or make theme configurable to include various JS files)

Google Cloud SQL VM refusing connection -

I am stuck in an attempt to understand why my cloud SQL VM is denying my connection to my machine. Added as subnet). I can wander SSH in VS but I can not access VM from the browser to create SQL. I have slipped the internet for days trying to decide but I am unable to pass this point. My Apache listens to port 80 Apart from this, to add the ID that I am making my sqls and php through mysql db for months, I am not sure if the problem is with apache although if it tells me where I should look. It seems that you have MySQL running on GCE VM, not A real cloud SQL example (this is a service different from GCE) Is it true? If so, if you are trying to connect directly to your mysql example from your local machine, then you are probably being blocked by a firewall. Go to the Networks tab (under Compute Engine) on the cloud console and see which firewall rules you have enabled. You may have to use one or more ports for 3306.

c# - Why does Math.Tan(90) provide a non-undefined value? -

While working with Math.Tan () I found that 90 degrees is not the result is . But 2myIs.png "alt =" Enter the image details here "> Here is the code, // change in angle angle = (convert. Repeat (op1) * Math.PI / 180); // Write Output Final Result. Text = Mutt.Tan (Convert.Dual Angle ()). ToString (); Why such behavior is done, is it expected? The calculation is done with the floating point number which is not correct (not that Math. PI can be fully displayed in the form of decimals.) more specifically .. If you want a round result then & gt; 89.9999 & amp; Amp; & Lt; 9 0.00,001 . Do not use == with floating point value. Do not use == with floating point number, try running this example: var d = 0.2 ; For (double k = 1.0; k & lt; 100; k ++) {var t = 0.2 * k; T = T / K; Console.light line ("{0} == {1} ==> {2}", D, T, D == t); } We are multiplying 0.2 by a whole number, dividing it by the same wh

Perl populating a hash from an array of hashes -

I have a script where I'm trying to populate a Pearl hash, when I personally do it I'll be able to dereference them properly while (my ($ key, $ value) = each (% {$ spec_hash {'XISX'}})} {print $ key, ",". $ Value; Print "\ n"; } While (my ($ key, $ value) = each (% {$ spec_hash {'XCBO}}} ")) {print $ key,", ". $ Value; Print "\ n"; } But when I try just% spec_hash and dereference, it only holds a $ exch reference, while it should have been two - XISX and XCBO but it never goes on XCBO . #! FOOConf using Sbcimp / dyn / data / EVT / GSD / script / Pearl / bin / pearl; # This is our custom DBI module usage data: dumper; FOOConf :: makeDBConnection (production); My $ dbh = $ FOOConf :: dbh; Choose e_risk_symbol from my $ query = "gsd_etds where level_name = 'EXCH_CS' and e_exch_dest = 'XISX' and e_symbol_comment in ('Bin_6', 'bin_56')"; If (! $ Dbh) {print "Error co

javascript - jQuery: display web page only after document.ready -

When I load a web page inside the document. I use an Ajax function: $ (document) .ready (function () {callAjaxFunction ();}); The effect is that the web page is displayed with the first empty field, and the field pops up after the Ajax function is over. How to show the web page after the Ajax function returns? (Show area once populated)? You can try to hide your entire document body first and then show it with AJAX callback Something like this: CSS: body {display: none; } js: $ (document) .ready (function () {callAjaxFunction ();}); Function ajaxcallbackfunction () {// callback function code, field $ ('body'). Show (); } So you have Ajax data once, pages will be displayed with populated areas.

javascript - Tell browser close apart from navigating away in onunload -

As a fontand explanatory routine, our web app stays certain states on the server when the browser is closed. However, when navigating away from the app we do not want to call the exit, because later the app can be navigated back. With the outgoing routine perspective, there are two different scenarios for navigating the browser and navigating. One way to write data to the server on the frontend is the downward event handler. However, we are having problems in separating the browser and navigating away. The downloaded handler is said in both cases. We need to tell us whether we are going away in the Inogly so that we do not call for the exit. Any thoughts? Thanks! From the perspective of the exit routine, there are two different scenarios to close and navigate the browser < / P> It seems that you can resolve this by keeping track of user status in a session cookie - a cookie that ends with no , , or Maximum-way attributes In this way, the session state will cont

multithreading - Serial Port Constant Monitoring in C# -

I have a program, starts when the search for serial ports available on the computer starts and if found For those for data they will be trying to open and listen. As of now, I have a configuration file that provides all port settings with port number. The first time I get the user, enter the first number where the device is connected. It is recorded in config and used from there. Now I would like to change it, so that when it starts, it scans the ports and receives the list of available serial ports. I can do this part with the SerialPort.GetPortNames () method. However, now I would like to ping each port and check that who is connected to the device, open that port and listen to that port. I can check with my device manufacturer to get the order to return the ping and ACK from the device. My question is for experts Is it the right time to put it off (portable / technically) done it in separate thread And probably the thread should be kept for serial port communica

android - does the old facebook sdk stopped working -

I was using the old methods of Facebook SDK (without pieces) in my app and they were working fine But they are not behaving according to the expectations for some time. I can log in using Facebook but it no longer brings data, even the name of the user is not even The view of the web opens up to enter, but still nothing can be brought. Apart from this, I want to invite my FB friends to use the app, but the new process is longer and complex than the old one. So is it possible to use old methods rather than new methods? Here is the code that I am using to log in and get the user name - applies the public class profile_ fragment fragment OnClickListener {ImageView login_facebook; String facebook_user_name; TextView fb_user_name, record_motivational_message; See @ Override public Crete View (Leautinfletr Inflatr, View Group container, bundle saved Instensstet) {// Todo Auto-generated method stub views = inflater.inflate (R.layout.profile_layout, null, false); Init (see); SetListener

c++ - Obtain iterator upon adding to std::map? -

Is there a way to get an Iterator while working with the standard library map container, which is the whole container? I have a management class for a map, and I want to return the iterator connected to the items added to the map. I do not want to believe in finding if I can avoid searches then I think better. std :: map & lt; Char, bool & gt; :: iterator category :: add (four items) {mymap [item] = false; Return mymap.get_iterator_lastitem (); } Maybe mymap.end () - 1; If you are not using C ++ 11, then std :: map & lt; Char, bool & gt; :: iterator ClassA :: Add (four items) {std :: pair & lt; Std :: map & lt; Char, bool & gt; :: iterator, bool & gt; Result = mymap.insert (std :: make_pair (object, incorrect)); If (! Result.second) {// item already exists, modify that existing item result.first-> gt; Second = false; } Return Results. Firstly; } If you are using C ++ 11 then it is better to use emplace + auto . std ::

android - startActivity(intent) not working in Google glass -

I'm developing an app for Google Glass using an immersion pattern. I Using the initial activity to switch between different tiles using the code below. showing the intent of ijaz = new intent (main activity., Capture image activation class); ShowImageDetails.putExtra ("IMAGE_DATA", data); StartActivity (showImageDetails); Data Variables holds a byte array for captured image Device activity of some time is not capable of starting and it exits from the application and OK Glass goes back to the tile. Has anyone seen this issue? I used characters as an example that comes with an API example. Depending on your comment, I have wild estimates that your image is too big to be sent with intent is. Have you seen the Java barrier failure error in the log or Binder transaction buffer has a fixed fixed size, currently 1MB, which is shared by all transactions for the process goes. As a result, this exception can be thrown out when many transactions are in prog

sockets - Is java's File class' object serializable? -

I am working on a project, it requires sending the directory information from one client to another on the network. So tell me, can I get this information only by sending the file class object to another file? Please tell me the reasons for your yes or no. Renewed Questions I am posting that code for which I have tried .... Customer code {- Soft Sock = New Socket ("10.16.10.82", 4000); / * Socket Sock: - Public class file client {public static zero main (string str []) = New socket ("127.0.0.1", 4000); * / // f = new file for localhost file ("MyFile.txt"); ObjectOutputStream OS = New ObjectOutputStream (sock.getOutputStream ()); os.writeObject ( F); os.flush (); os.close (); System.out Println ("object sent");} hold (ex before) {ex.printStackTrace ();}}} and the following is the server code: - < Code> class fileerver {public static void main (string str []) {try server server = Socket = new server (4000); while (true) {s

wordpress - Remove empty div in php -

I know that I can remove an empty div using javascript, but is it possible php? I have a div in which there are many statements that fill the content of Div. If those conditions are not met then I wake up with the empty division, I am not doing anything in div, if it makes it easy. Is it possible php? Is .hide () or .remove () php equivalent? You can try by turning the div inside the circumstances and closing it wherever appropriate. If a particular condition is present then it displays the div > Other, your code does not include a specific device E, For G (if some sash ..) {echo " "; Your code ... echo "& lt; / div & gt;"; } I have shown you simple one using one, but you can fix it for any number of small attention to open Close the DIG tag Jquery equal to the second sequence Jquery i.e. $ ("# ABC") Hide (); css #abc {display: none; } etc. I just gave you a sample but you can find them ...

jquery - How to make Select2 work with dependent form in rails? -

I have "selection country" and "select city" form, if there is no value for "select country" , Then it shows "Please select country" text, when I selected the country, it will be loaded with "city selection". This works fine, however, when I try to use select2 jquery, Select2 only works with the "select country" form, but this will not apply to the "Select city" form. This is my code: _form.html in Erb & lt; Div class = "field" & gt; & Lt;% = f.label: Country% & gt; & Lt; Br> & Lt;% = f.country_select: Country, Priority:% w {TH SG MY}, hint: "Please select country"%> & Lt; / Div & gt; & Lt; Div class = "field" & gt; & Lt;% = f.label: City% & gt; & Lt; Br / & gt; & Lt;% = Partial render: 'suburban_style', local: {parent_region: f.object.country}%> & Lt; / Div & gt; _subregion_select.html in AR

date difference in days in javascript? -

I know how to use javascript, but I do not have any profound knowledge about it. I know how to find a difference in PHP in February, but in this case, I need a Javascript solution. Honestly, I do not even know that it is possible to do this with JavaScript. I think this is, but it's just an estimate. Here is the html I have: These two fields are actually bootstrap date pickers, they always come with some default values. Now, I want the user to change those two values ​​to calculate the difference between two dates (Alerts or Console logs, I will find my way out there). The problem is that I have no clue where it starts from and how to calculate it again, I think the changing event can be a good candidate but ... I do not know how the difference To calculate. Any help would be appreciated. Regards, John You can make your string a javascript date first Like: var start = $ ("input [name = checkin]"). Val (). Split ("/"); Var end = $ ("

c# - Don't Post ASP.NET fields __EVENTTARGET, __EVENTARGUMENT and __VIEWSTATE -

I would like to know whether an ASP.NET field is an effective way of not posting code __EVENTTARGET , __ Events and __Vistat . I am posting data to an external page that is not in ASP.NET, so it does not need those fields. I have tried to deactivate the field in my page, but they are still submitted in POST request (they are only empty). Do I programmatically modify post content? Or can I set it up in a config file? Thank you! The only way I had to stop to post this ASP.NET field is DOM In order to remove fields with javascript. As the hidden fields are automatically included in the form, removing them after loading the documents, they are no longer posted.

java jLabel image does not update -

I am creating a feedback label that shows the user the image selected in the file dialog. When a picture file is selected, that image will be updated in the picture on which the user clicked. The first time the picture is selected, it works fine, but when the second picture is selected for the second time, it remains in the form of the first picture. Code: Private Zero jButton3ActionPerformed (java.awt.event.ActionEvent evt) {// Browse button FileDialog fd = New FileDialog (Select this, "Choose a file" , File dialog.load); Fd.setDirectory ("C: \\"); Fd.setFile ("* jpg."); // jpg files only fd.setVisible (true); String file name = fd.getFile (); If (filename == faucet) {System.out.println ("You have opted out"); } Else {savePicture ("temporary"); // Save it in temp.jpg This overwrites an existing image Image Icon imgThisImg = null; ImgThisImg = New Imaging (absfilePath + "/temp.jpg"); JLabel7.setIcon (zero); JLabel

lua - Corona SDK Scrollview: double scrollview structure with linked contents -

Image
मुझे स्क्रॉलव्यूव्यू की एक संरचना करना है, जैसे: मुझे एक प्रमुख स्क्रॉलएव्यू (ए) की आवश्यकता है जो केवल ऊर्ध्वाधर में स्क्रॉल कर सकती है, और लिंक किए गए स्क्रॉल वीव (बी ) जो क्षैतिज में स्कोल कर सकते हैं। पीले रंग की सामग्री को ऊर्ध्वाधर में स्थानांतरित किया जाना चाहिए अगर मैं एक स्क्रॉलव्यू स्क्रॉल करता हूं और क्षैतिज में बी के साथ भी। i ऐसा करने का प्रयास करें: स्थानीय scrollView = विजेट। NewScrollView {top = display.contentHeight * 0.08, left = 0, width = display.contentWidth, ऊंचाई = डिस्प्ले.contentHeight * 0.85, scrollWidth = ScrollWidthGlobal, scrollHeight = scrollHeightGlobal, hideBackground = true, श्रोता = स्क्रॉललाइस्टनर, टॉपपैडिंग = - 25, नीचेपैडिंग = 0, क्षैतिजक्रॉलडिवाइस = सच} ----- कुछ सामग्री ------ स्थान L OscrollView = widget.newScrollView {top = 0, left = L6X, width = display.contentWidth - L6X, ऊंचाई = डिस्प्ले.contentHeight * 0.925, - scrollWidth = display.contentWidth, - scrollHeight = display.contentHeight * 0.85, छुपाएं पृष्ठभूमि = सच, श्रोता = स

php - Yii Framework - render form validation result in JSON format? -

I have a form that I want to display an error message. The correct message in a better UI like icons with animation. While using the Yii framework, the error render is controlled by the classify class and I do not know how to modify the echo format even after reading the code. I know that you can set a message in the rule () in the Model class, but it does not resonate if it passes the verification and I think that when you need a hard code , Then it is not a good idea to maintain it 'message' = & gt; "{" Name ":" userName "," result ":" unsuccessful "," msg ":" taken from beforehand "}, ' Yes you can and here is an example my friend header ('content-type: application / jason'); $ ContactForm = New ContactForm (); $ ContactForm- & gt; Body = "some hunt"; $ ContactForm- & gt; Valid (); // boolean returns; right or wrong. If everything is okay then it becomes tru

c# - Cast object type in a LINQ statement -

मेरे पास एक परत संग्रह है जिसमें एक सामग्री ऑब्जेक्ट के रूप में है संपत्ति। var item = Layers, उदाहरण के लिए: फर्स्टऑफ़ डीफॉल्ट (एक्स = & gt; (पुशपिन) x.Content.Description == "xyz"); इस मामले में सामग्री है पुशपिन ऑब्जेक्ट प्रकार का है और मैं इसकी description संपत्ति की तुलना करना चाहता हूं xyz कोष्ठकों के साथ संलग्न करें Var आइटम = परतें। फर्स्टऑफ़ डीफॉल्ट (x = & gt; ((PushPin) x.Content)। वर्णन == "xyz");

html - Full width divisions using HTML5 and CSS3 (responsive) -

I'm relatively new to StackOverflow and I'm experiencing some difficulties in creating webpages What is a one-page website that is divided into different sections, which is a full-width divas (i.e., 100% width of the screen) and is consistently with different background colors. The problem is facing the Divis not take the full width of the screen and not only the white space on the sides, but also between 2 Divs - Also, when the window size decreases , Then the difference between divs increases. The desired result is seen in the following websites: The code that I Here's what I am using: i) HTML: & lt; Html & gt; & Lt; Body & gt; & Lt; Div class = "full" id = "one" & gt; & Lt; H1 & gt; Some other & lt; / H1> & Lt; / Div & gt; & Lt; Div class = "full" id = "two" & gt; & Lt; H1 & gt; Some other & lt; / H1> & Lt; / Div & gt; & Lt; / Bod

Can we use DynamoDB Mapper for atomic counters(Java)? -

I was looking at Dynamo DDB documentation and googling, but any implementation of nuclear counters using the Dynamo DB Mapper did not get. Is this possible? Or can it be the only low level API used? You should see AttributeAction.ADD with the Java API Edit after the comment. I do not know about that option, maybe you should edit your question and want to add the code you want. If you want a @DinModbietInCreated attribute for an integer - nobody is there.

java - getType() method not found in antlr4 -

The rule below is a quote from the larger rule, note the optional part at the end of the grammar tail. After the input is parsed, we go on the tree with generating paras to evaluate the expression. The listener code for the first rule is also given below. Arithmetic: Arithmetic Factor (op = (Multicellular) Arithmetic Factor) *; Arithmetic Factor: INTEGER / * For now, Become a Simple Terminal * / Listener import java.util.ArrayList; Import org.antlr.v4.runtime.misc.NotNull; Import org.antlr.v4.runtime.tree.ParseTree; Import org.antlr.v4.runtime.tree.ParseTreeProperty; The public class pedicalkt evelator extended the Gradient Barrister Listener to {Personal PertyProperty & lt; Float & gt; FloatValues ​​= New Parspty Property & lt; Float & gt; (); Private Archieist & Lt; Float & gt; Arithmetic factorial = faucet; Private zero setflat value (Parsity node, float value) {floatValues.put (node, value); } Private Float Flat Value (Pursi Node) {Return Float

android - Installation error: INSTALL_FAILED_DEXOPT -

Hello I have a big problem that my application size is around 10 MB and I have a junk of 7 MB junior. Recently I updated my application after adding the googleplayservice that my apk is not installed in the device which is less than API level 11. I put my log cat here. 08-01 15:09: 25.333: e / dalvikum (429): more than linear allocation capacity (5242880), final = 100 08-01 15: 09: 25.333: E / Dalevic (429): VM abrogated 08-01 15: 09: 25.522: W / Installed (34): DexInv: --- END '/data/app/com.xxxxxx.xxxx.android-1.apk' - - Status = 0x000b, Process Fail 08-01 15: 09: 25.522: E / Installed (34): '/data/dalvik-cache/data@app@com.xxxxx.xxxx.android-1.apk@classes.dex Failed on 'res = 11 problem Our method up to 64k size Reaches the easy solution for this issue. The need to be in or we need to remove some of the library is not required. The best solution is that we can use AP for the use of AP. And create a build.xml file to split our library into two files, and we

ios - NSUserDefaults returning nil -

After Try to save an object to NSUserDefaults and then remove the same object. // Raw: Enter any object! = Defaults.valueForKey ("testKey") // go to data = such as raw NSData // // self.Report = NSKeyedUnarchiver.unarchiveObjectWithData (Data) DayReport // // println (Report.Day) Report.Day = "Mon" Go to data = NSKeyedArchiver.archivedDataWithRootObject (self.Report) println (data) defaults.setObject (data, forKey: "testKey") defaults.synchronize () This piece of code The object NSUserDefaults has been encoded into NSDT in saving. Déporte is that type of report But when I switch the comment sections, the upper part of the code is not commented and the lower part is , let var = (zero) and the program crashes. Why? DayReport is NSCoding protocol. update defaults.setObject (data, forKey :: "testKey")> I added this default defaults.synchronize () println (defaults. ObjectForKey ("testKey")) and pr

php - How to sanitize user password information in WordPress? -

I am capturing user name, email and password in my custom registration form on my WordPress site. Clears the email address to sanitize_user () and sanitize_email () . For example: $ username = sanitize_user ($ username); $ Email = sanitize_email ($ email); How should I approve the password entered by the user? Think of sanitize_text_field ($ pass) , but I'm sure it's not the right way to do this. Ref: It is not necessary that you need to use a prepared statement to protect against injection by preserving it - or in case of WordPress, use it. Synthesis strips only invalid characters; In the above cases, it removes characters that are not in user names or are not allowed in a valid email address. Passwords allow for many different types of characters because it is what makes them "strong", so that you do not want to snatch them. If you are using to create a WP user, then you do not need to be able to customize it in any way, this task wi

c# - Json.net override method in DefaultContractResolver to deserialize private setters -

I have a class with properties in which there are personal sets and I would like them for those qualities DeSerialized using Json.Net I know that I can use the [JsonProperty] attribute to do this, I will call it DefaultContractResolver I want to implement it. Here are some example codes I'm using, but it's a coherent job. Fixed zero main (string [] args) {var a = new a (); A.s = "Monday"; One set (); Console.WriteLine (JsonConvert.SerializeObject (a)); Var strrr = JsonConvert.SerializeObject (a); On strobj = JsonConvert.DeserializeObject & lt; A & gt; (Strrr, new JsonSerializerSettings {ContractResolver = new PrivateSetterContractResolver ()}); Console.Read (); } This is the class that I want to serial public class A {Private int test}; Public examination test {return examination; } Private set {test = value; }} Public string {get; Set; } Public Zero Set () {Test = 33; }} The implementation of this is DefaultContractResolver Public

How to open/run java program using cmd in another java program -

I want to compile Java program by creating a Java command through another Java program in CMD, then run it I How to do Is there a class that I can use? For example, here is the CMD C: \ user \ user name \ document> Javak helloard. Java How can I compile HelloWorld.java inside a Java program, then it Let's run. Here is my initial source code that contains a directory and Java file. public class test {public static zero main (string [] args) {string directory = "c: \\ user \\ user name \" document "; String filename = "HelloWorld.java"; }} try it try {/ / Execute command string command = "cmd / c start cmd.exe"; Process child = Runtime.getRuntime (). Exec (command); // Get the output stream to write it out OutputStream Out = child.getOutputStream (); Out.write ("and execute Java class by mentioning the normal order;"); Out.flush (); Out.close (); } Hold (IOException e) {}

c# - Nested classes don't have a namespace -

Image
I am writing a custom FxCop-rule, which is that it checks exception class derived from the exception namespaces. It checks completely thorough work but, in my testcase, I came across some strange namespace MyNamespace.IO {[TestClass] public class ExceptionsShouldOnlyInheritFromCorrectNamespacesTests {[TestMethod] Public Zero TestExceptionInheritanceNamespace () {RuleAssert.AssertProblemsAreEqualToExpectedProblems & Lt; ExceptionsShouldOnlyInheritFromCorrectNamespaces, ExceptionInhertTestClass & gt; (); }} Namespace some {[CaRuleTestClass] public class ExceptionInhertTestClass {public class MyFirstException: SystemException {} public class MySecondException: FileNotFoundException {} [ExpectedProblem] public class MyWrongException: AbandonedMutexException {}}}} The code above shows the setup as you can see that I have a nested-namespace (this is only for testing). In this there is a main class ExceptionInhertTestClass which holds three testclasses that are run by cust

Android:How to display menu items in a grid view(normally it displayed in listview)? -

Image
I want to display the menu item in a grid view, but it usually appears in the list view is. Can we apply gridview to menu items? I think the menu item shown in "list view" "Action bar overflow is referred to as" which is decreasing from ... : (Image courtesy of Android open source project) You do it by the way it sang Goes, has no control over it; They will be on a vertical-scrolling list.

emacs - elisp: insert a double quote without the backslash -

Here we are a classical, I'm trying to surround a word with double quotes, but this backslash Also inserts! I do: (replace-regexp-in-string "[a-za-z0- 9] +:" (lambda (match) / Code> The results include backslashes! "one \" tw2o \ ": three" My goal is to process it with json-read-through-string . I do not think this is a problem printing in ielm Because json reads fail. I have a working version that uses the same problem on temporary-buffer and again search-forward Any help and explanation appreciated! Many thanks. Edit : If I use the string (setq myjson "{ One: \ "1 \", two: \ "2 \"} " , my function works: (json-read-from-string (replace-regexp -in-string "[A-za-z0-9] +:" (lambda (match) (concat "\" "s-replace": "" "match" "\": ")) myjson)) but the result is I Removed the edits which claim that it works be

Android CountDownTimer onTick method not called -

I have this code in Android Private Zero startStageTwoTimer (long term utlastet two ) {Timer = new countdown timer (time-unilestage two, 1000) {finial on public zero} {timer canal (); } @ Override tick on the public null (long up until now) {log. V ("millisUntilFinished", millisUntilFinished + ""); Calendar Calendar = Calendar.getInstance (); SimpleDateFormat formatter = New SimpleDateFormat ("hh: mm: ss", localegate default ()); Calendar.setTimeInMillis (millisUntilFinished); TextView.setText (formatter.format (calendar.getTime ())); } }.Start(); } Where is "time-unitstage to two" the next day is a few hours long, so I refresh the textView and change its text on every other (in the ontic method ) I want to make The problem is that the onTick method is called only a few times, and then it is being called at all, why is it so? The thing is that I want to create a timer in the activity, which does not count till that time time t

for loop increment in php on button click -

I have a button when it is redirected to a function that initially has $ i = 0 < / Code> Then increased by 1, it has also been checked that if it is less than 10 then its code runs. But when I click on the button again, it should increase from 1 and now the value should be 2. This is my code. function testing () {$ i = 0; $ I ++; Click on the button ($ i & lt; = 10) {sample code}} button, this function is called. Try below: - var i = 1; Function testing () {if (i & lt; = 10) {sample code} i ++; }

winforms - I wan't that the user can only type x.x.x.x in a Textbox -

As I said in the headline: I do not want the user to type x xxxx in just one textbox (x a number I tried a masked text box and changed it to the mask under properties: // mask: 9.9.9.9 / Previw: _ But when I get the value of the maskedtexbox, I get: // value: 1,1,1, 1 << P> // value: 1.1.1.1 The post text "itemprop =" text "> contains: . < / Code> The decimal placeholder will be the appropriate decimal symbol suitable for the actual display character format provider, as the format of the control is determined by the provider property. ... \ Escape. Avoid a mask character, changing it to a literal form, "\\" is an escape sequence for a backslash. should not use. If you always want a period regardless of area settings: in that case you . should be used.

msmq - The queue does not exist or you do not have sufficient permissions to perform the operation -

When I try to test the queue via message bus I have checked and permissions for full control I'm using a 'msmqmng.exe send' from a different machine, by putting a message in the queue, it works and absolutely the message that I have sent, so what is the other running parts I am missing ?? ? This error, and the root cause was that storage quota was exceeded for MSMQ! Which does not seem to be related to the error message, which makes it a difficult reason to find ... When sending a message to MSMQ, the sender server will use an outgoing queue located on the sender side, and This outward queue is using storage on that sender server. MSMQ component has the maximum quota defined in MSMQ properties, and when the quota crosses the quota, the above error message popping starts A. When you were sent from another machine, it works correctly, because the problem is not with the sender receiver). Resolution : To change this quota, click on inviting message (if computer s

java - Stuck on Mean word length -

इस कोड का लक्ष्य मुख्य विधि जावा का विश्लेषण करने के लिए प्रोग्राम को एक टुकड़ा पाठ बनाने के लिए था जो एक उपयोगकर्ता से दर्ज किया गया है । वे एक स्कैनर में टेक्स्ट डालकर ऐसा करते हैं जो प्रोग्राम द्वारा तब विश्लेषण किया जाता है। विश्लेषण शब्द आवृत्ति का उत्पादन करना है, उदाहरण के लिए "यह एक परीक्षा है" इस परिणाम उत्पन्न करता है: यह एक परीक्षण है 1 अक्षर शब्द: 1 2 अक्षर शब्द: 1 3 पत्र शब्द: 0 4 पत्र शब्द: 2 5 अक्षर शब्द: 0 जिस बिट पर मैं फंस रहा हूँ वह औसत / औसत उत्पादन कर रहा है, मेरी हिम्मत मुझे को विभाजित करने के लिए कह रही है। लम्बाई str.length से, लेकिन मैं जावा में सर्वश्रेष्ठ नहीं हूं और मैंने इसे लागू करने की कोशिश की है लेकिन मुझे सभी त्रुटियां हैं I मैं किसी को भी मुझे कोड देने की उम्मीद नहीं कर रहा हूँ, लेकिन अगर कोई मुझे संकेत दे सकता है कि मुझे क्या करना चाहिए या मुझे सही दिशा बताएंगे, यह बहुत सराहना की जाएगी। कोड: आयात करें java.util.Scanner; सार्वजनिक वर्ग Text_AD {सार्वजनिक स्थिर शून्य मुख्य (स्ट्रिंग [] आर्ग्स) {जबकि (सच) {स्कैनर इनपुट = न

Using Coda Hale Meter in Spring Boot application -

The documentation says that the user creates the Coda Hell metrics by prefixing it with their metric names. The appropriate type (eg histogram. , meter. ) I mean, I can use either a counter or a gauge with the metric name form "meter. *" And it will work as a meter I have tried counterService.increment ("meter.si.invoice.processing"); But when I go to / management / metrics , I get counting and no metric rate. What is the correct way to use Coda Helm in Spring Boots? The documentation is not very clear how the integration works. Metrics is not aware of endpoint codewhich content. Once you send your metric, you need to use the Codhale tools to remove them (for example, one meter does not map directly to spring boot metric types, so the way you have tried them There is no clear way to expose).

android - Call a method in MainActivity.java on event that happens in a library file -

itemprop = "text"> I included the library in my Android project In the mainActvitiy.java, the onCreate method contains something like this: SimpleCardStackAdapter adapter = new simple cardstock adapter (this); // This library should also be done on an event in class: adapter.add (new cardmodel ("Heading 2", "Description 2 goes here", R.ZDraravable (Arrowable Picture 2)); Now, in CardContainer.java (which is related to the swipeable card library) is an event on which I have a new item adapter adapter.add (. ..) . The adapter was defined in mainactivity.java as you can see above. How can I get it? I first thought about defining a new method in main activity and then calling it from its library category, like: Public Zero Call Frame Library () {Adapter.add (...); } However, the method and adapters need to define static, except that I do not know how to make this method of main activity available in CardContainer.java. I believe that I

postgresql - Call plpgsql function in select's where clause -

मेरे पास एक plpgsql फ़ंक्शन fillwhere (parameter1 date) जो एक जटिल रिटर्न जहां एक पाठ के रूप में खंड , मान लीजिए कि यह एक कोड के रूप में clause2 = filter2 देता है, लेकिन यह वास्तव में अन्य खंडों का एक गुच्छा देता है। मुझे इस फ़ंक्शन को एक चयन में कॉल करने की आवश्यकता है जहां खंड पूरक कि खंड, यह है कि मैंने अभी तक क्या किया है: SELECT value1 से तालिका 1 WHERE clause1 = filter1 और पूरक जगह (पैरामीटर 1); लेकिन यह त्रुटि देता है का तर्क WHERE का प्रकार होना चाहिए प्रकार बूलियन, प्रकार टाइप नहीं क्या है ऐसा करने का सही तरीका? आप एक टेक्स्ट मूल्य कोड में, जो आमतौर पर SQL में संभव नहीं है आपको या तो सर्वर पर दो दौर यात्राएं करने की आवश्यकता है। प्राप्त करें WHERE खंड: SELECT पूरक जगह ('& lt; mydate & gt;') । SELECT क्वेरी को कंसैट करें इस क्वेरी को निष्पादित करें: SELECT .. WHERE ... । या (अधिमानतः) गतिशील का उपयोग करें एसक्यूएल एक पीएल / पीजीएसयूएलएल फ़ंक्शन में है। एसओ पर बहुत से उदाहरण हैं। आपने अपना वास्तविक कोड नहीं दिया

python - How do I update dataframe column values with Pandas? -

Say that I have a bunch of data that comes like this: 10-12-2014 3.45 10-12-2014 3.67 10-12-2014 4.0 10-12-2014 5.0 10-13-2014 6.0 10-13-2014 8.9 And so many On. I want to keep this stuff in Pandu Data Frame in a format like this: 10-12-2014 3.45 3.57 4.0 5.0 10-13-2014 6.0 8.9 etc. Etc. To do this, I currently have something like this: rows = cursor.fetchall () df = pd.DataFrame (column) ('Previous' date for row in row, 'val 1', 'val2', 'val 3', 'val 4')) previous_data = 0: if previous_data == 0: df And this is where I got stuck - I can not find any way to Irf Adds the values ​​in a date column. I'm also not sure how to update the old column in future iterations, because I'm actually able to find examples of people just adding the entire rows. Or is there a better way to do this? Working with a string to come in that form you can do the following. 1) Get the data as DF d = "" 10-12-2014 3.45 10

html - How can i forbid a line break of a post in a 3-column layout? -

यह मेरा कोड है: पैरेंट: .footer {चौड़ाई: 98%; ऊंचाई: 98%; गद्दी: 1%; पृष्ठभूमि का रंग: लाल; font-size: 14px; स्तंभ-चौड़ाई: 50%; -मोझ-कॉलम-चौड़ाई: 50%; -वेबकिट-कॉलम-चौड़ाई: 50%; स्तंभ गिनती: 2; -मोज-कॉलम-गिन: 2; -webkit-column-count: 2; पृष्ठभूमि का रंग: # 2c2c2c; छिपा हुआ सैलाब; } बाल: । Posting {सीमा: 1px ठोस भूरे रंग का; पृष्ठभूमि का रंग: # 585,858; बॉर्डर-त्रिज्या: 5px; margin-bottom: 6px; } HTML को देता है: & lt; div class = "footer" & gt; & Lt; div class = "text" & gt; & Lt; div वर्ग = "पोस्टिंग" & gt; सामग्री - सामग्री - सामग्री & lt; / div & gt; & Lt; / div & gt; & Lt; / div & gt; वर्ग। पोस्टिंग में एक पोस्ट होता है, जो कॉलम के अंत में लपेटा जाता है, मैं इसे रोकना चाहूंगा, ताकि एक पोस्ट हमेशा ही संगत हो। मुझे लगता है कि आप white-space: nowrap; अपने .osting वर्ग के लिए अपने सीएसएस में। JS Fiddle:

amazon web services - Required attribute in Dynamo.DB -

I have dynamo I am using DB and following for node. JS; I was wondering how can I be an attribute as "necessary"? Here I got an example in the document, but I'm not sure that we can have the "required" attribute in the dynamo. DB or not? // Jason object var items based on [string, number, string array, or number array] {Score: 304, Date: (new date) .getTime (), Sha: '3d2d6963 ', USR:' Spolu ', LNG: [' node ',' C ++ ']}; Ddb.putItem ('a-table', item, {}, function (err, res, cap) {}); I do not think you can only do primary keys, because dynamody 'Schema-less', it does not really understand that the schema-less database has the required attribute on the field.

ios - Accessing Custom User Fields in Parse Objective-C -

I have called a custom user field, which is called insufflenzer which creates a new user using the following code : New user [["" Influencer "] = @Yes; I use the code given below to access it in another category I'm trying to, but it always logs in console instead of 0: BOOL influencer = [Self.currentUser [@ "isInfluencer"] boolValue]; NSL Og (@ "% hhd", influencer); Should I use this variable to return the correct Boole value? < Div class = "post-text" itemprop = "text"> I found out that I need to query the user table with the following table: PFQuery * query = [ From there, I had to find out what I should do to show the query. Html>

javascript - Unable to execute function after JSON loaded -

Indicates that when a JSON request completes, a name is 'Antonio' Appears but the jQuery function is not implemented on this. Please make sure that document.write is an essential function for me. This is the code I wrote for the name of Antonio. & lt; Script type = "text / javascript" & gt; Function Gallery (JSN) {document.write ('& lt; span & gt;' + json.feed.title. $ T + '& lt; / span & gt;'); } & Lt; / Script & gt; & Lt; Script src = 'http: //www.antonio-bloggerever.blogspot.com/feeds/posts/summary/-/ constructive max-results = 2 & alt = json-in-script and callback = gallery' / & gt; You essentially bind one click event Trying to use an element that is not yet dynamically added to the DOM and added elements. $ ('span'). On ('click', function () {warning ('aaa');});

go - "no debug info in ELF executable errno" when running a binary built with gccgo -

I decided to try, and thus wrote the code of the following code: Package main import "fmt" func main () {fmt.Printf ("hello, world \ n")} I saved it main.go , and Then he tried to compile it using gccgo main.go -o main . This worked, however, when I tried to do the ./ Main , I found the following message: ALF executable error-1, no debug info in deadly error No: There is no debug info in the ALF executable Runtime Stack: No debug info in the ALF executable fault What happened on earth? First of all, do not use GCCO, it does not support Go 1.3. Second, depending on Go Runtime debug information, which I think is you using an old version of GCC (maybe 4.8) which automatically strips it, you can call it gccgo -g main Such as .go -o main If you use Ubuntu, it is relevant.

azure - How do I capture .NET CLR memory performance counters for 64-bit programs? -

I'm trying to add .net CLR Jit (*) \% and Other similar counters are to be gathered by Windows Azure Diagnostics in my blue web role. I added them to the list using Diagnostic Monitor configuration. Display Datasheet data source. Add () but they are not being collected (other counters such as CPU consumption are gathering in the meantime). I have noticed that if I have not listed those counters from typeperf.exe to the system32 folder, but if I instead of typeperf.exe From the Run SysWow64 folder they are listed. So I think they have somehow gathered for 32-bit programs and since my code runs in 64-bit processes, they do not get collected for my code. What am I doing? How did I get those counters?

regex - Perl Extract URI from site -

Code for a Perl script needs some help. I am using the LWP library to get a website. Buy Now, I need to remove a URL from this HTML file. I just need to remove the first URI in which the end "1500_.jpg" is included I tried to use the URI: Find it and it worked very well. I had finished all the URIs "1500.JPG", but I realized that URIs are not in the correct order. My code is #! Use / usr / bin / perl strict; Use warnings; URI :: Search; LWP :: Simple; My $ url = 'example.com'; My $ html = get $ url; My% uris = (); My $ finder = URI :: Search-> New (& amp; amp; callback); My $ Found = $ Finder- & gt; Find (\ $ html); My @ uris =% uris; My @ match = grp (/1500_.jpg$/, @ uris); Print my $ uri (@ match) {Print "$ uri \ n"; } Go out(); Sub callback {my ($ uri_url, $ uri) = @_; $ URI {$ uri} ++; Return "--- Ersetzt durch XXXxx ---"; } How can I remove the URI before a website, which finally got "1500_.jpg"

java - Auto generate unique random string in Spring MVC + Hibernate -

पृष्ठभूमि मैं स्प्रिंग MVC (फ्रेमवर्क v4.0.6.RELEASE, JPA का उपयोग कर एक प्रोजेक्ट लिख रहा हूँ V1.6.2.RELEASE) और हाइबरनेट (कोर v4.3.6.FINAL, जेपीए एपीआई v2.1)। मेरी परियोजना में, 'परियोजना' नामक संस्थाएं हैं इनमें से प्रत्येक प्रोजेक्ट की अपनी अद्वितीय, ऑटो-जनरेटेड आईडी प्राथमिक कुंजी के रूप में है। यह आईडी निम्न कोड द्वारा उत्पन्न होती है: @ आईडी @ कॉलम (नाम = "प्रोजेक्ट_आईड") @ जनरेटेड वैल्यू (रणनीति = जनरेशन टाइप। एओटीओ) निजी लंबी परियोजना आईडी; यह कोड अपेक्षा के अनुरूप काम करता है और स्वचालित रूप से अद्वितीय आईडी बनाता है। समस्या इन परियोजनाओं में से प्रत्येक को यादृच्छिक, अनोखा 1 'गुप्त' स्ट्रिंग होना चाहिए, ठीक उसी तरह एफ़आईपी प्रदाताओं जैसे फेसबुक, ट्विटर, इत्यादि द्वारा सौंपा। तो, इसे प्राप्त करने के लिए, मैं हाइबरनेट डॉक्स के अनुसार निम्न कोड का उपयोग करने की कोशिश की: @Column (name = "project_secret", nullable = गलत, अद्वितीय = सच) @GenericGenerator (नाम = "uuid-gen", strategy = "uuid") @ generate