Posts

Showing posts from May, 2011

vbscript - Checking OS version -

Hello I'm having trouble understanding this code. Can anyone explain to me what does this do? GetOperatingSystemVersion if OSVersion & gt; 6.0 then strCMD = "c: \ Windows \ System32 \ manage-bde.exe" otherwise the strCMD = "cscript.exe c: \ Windows \ System32 \ manage-bde.wsf" if the end gets' sub GetOperatingSystemVersion set objWMIService = GetObject ("Winmgmts: {impersonation level = impersonation}! \\. \ Root \ cimv2") set oss = objWMIService.ExecQuery ("Choose Win32_OperatingSystem * from") OS OSVersion = OS = Left in each (OS version, 3) OSVersion = Round (OSVersion, 3) Next End Sub In my opinion, it will call GetOperatingSystemVersion and will check for loop. This is the part that I could not understand thanks in advance :) Actually, this operating system version Uses to retrieve The first two lines are only standard WMI-to-VBScript idioms. If you run a keyword search, you will find a lot of sample code and inf

recursion - how convert recursive method to nonrecursive in java -

I am trying to get a combination of five digits, which is equal to 20 and whose average value is certain The value is equal to. My code is package other; Import java.util.ArrayList; Import java.util.list; Import java.util.Random; Public Category Random Numbers {/ ** * @ Ultimate Arguments * / // Maximum Avg = 3.6 /// Minimum Average = 2.2 Public Fixed Zero Main (String [] Args) {// Tudo Auto-Generated Method Stub List & lt ; Integer & gt; I get = (); } Public static list & lt; Integer & gt; getNumbers () {List & lt; Integer & gt; n = new arrelisted & lt; Integer & gt; (); Random R = New Random (); {Int rr = r.nextInt (10); for int (i = 0; i <5; i ++); n.add (rr); } Int sum = 0; Double average = 0; For (int j = 0; j & lt; n.size (); j ++) {sum + = n.get (j); Average + = ((j + 1) * n.get (j)); Println (n.get (j)); } System.out.println ("average:" + average / 20); If (zodiac == 20 & (average / 20) == 2.1) {getCombination (n); }

regex - Using grep (or similar) to get string AFTER first match -

मान लें कि मुझे कुछ पाठ JSON में है: {"key1": "value1 "Value2" "key3": "value2" "key3": "value3" "key4": "value4" "key5": "value5"} {"key1": "value1" "key2": "value2" "key3": " Value3 "key4": "value4" "key5": "value5"} मुझे क्या करना है "value1" मिल रहा है, लेकिन केवल "value5" प्रिंट करें कई "मान 5" होंगे, लेकिन मैं इसे प्रिंट करना चाहता हूं अगर "value1" (जो कि एक अनूठी स्ट्रिंग होगी) से पहले है। मैं grep -Ax & amp; -बीएक्स के रूप में मैं लाइन के बाद मैच नहीं करना चाहता, बजाय मैं स्ट्रिंग मुद्रित करना चाहता हूँ। बिल्ली टी {" key1 ":" value1 "" key2 ":" value2 "" key3 " कुंजी 4 ":" value5 ":" value5 "} {" key1 ":" value6 "" key2

c# - LINQ: How to null out properties in a projection? -

Image
The title is very awesome, so try to explain it in code. I have a unit named Change and has a collection of institutions in the ChangeDetail I want to store the Change > ChangeListItem is called . I'm roaming with LINQPad and have actually launched and I want to work, but whatever I can not do, leave all those people in the group except ChangeListItem s. Here's my code: Change the Change category public class: {Receive the public date time change time; Set; } # Area Navigation Properties Public Virtual IcLonac & lt; ChangeDetail & gt; Details {Receive; Private set; } #endregion Public Changes () {this.Details = New list & lt; ChangeDetail & gt; (); }} ChangeDetail class public class ChangeDetail {public string description {get; Set; } #region Navigation Properties Public int ChangeId {get; Set; } Change public virtual changes {get} Set; } #endregion} My linppad attempt var change = change Select Selection (C => C. Descripti

debugging - Visual Studio 2013 and VB Scripts -

I was thinking that Visual Studio 2013 can compile and debug VBScript files? If someone knows, please tell me how to Thank you for your time. Firstly VBScript is an interpreted language and does not need to be compiled. But yes, you can debug your VBS201 file inside VS2013. Just open the file that you want to debug with VS 2013, under "Tools / External Tools" you must register Windows Script Host (CScript.XA or WScript.exe) with some startup parameters: < Pre> title: cscript debug command: c: \ windows \ system32 \ cscript.exe logic: // nologo // X $ (muddy) initial directory: $ (itemdir) check "use the output window" press the OK button To start, debugger, just click on "Tools / Cscript Debug" VS JIT Debugger asks you, the debugger you want to use. Just choose your * .vbs file and click Yes. Sometimes this is a little buggy but it works; -)

iphone - Mobile Hybrid App: Working in browser like chrome,IE etc. But not working any mobile device -

I have created a simple project with phones, I can see output simple project in Google chorme and etc. I have used this project to create UIWebview in UIcode 5. Built-in and install the app in iPhone 5. I can see output simple projects in any mobile device like iPhone 5S and Samsung S4 etc. Index.html & lt; Html & gt; & Lt; Top & gt; & Lt; Title & gt; Changes were done & lt; / Title & gt; & Lt; Meta charset = "UTF-8" /> & Lt; Meta http-equiv = "X-UA-Compatible" content = "IE = edge, chrome = 1" /> & Lt; Meta name = "apple-mobile-web-app-enabled" content = "yes" /> & Lt; Meta name = "msapplication-tap-highlight" content = "no" /> & Lt; Meta name = "format-address" content = "telephone = no" /> & Lt; Meta name = "viewport" content = "width = device-width, initial-scale = 1.0, max-scale = 1.0" /> &

php - Fetch value from database into dynamically added row -

I'm new to PHP programming, now I'm making a program for billing system. The table is created and by adding the row dynamically to the table, it works fine. Now I want to add value to the database in the dynamically added row, please tell me how to add value. Here is my code form & lt; form style = "margin-left: 200px; padding: 10px; background: yellow; width: 500px;" Action = "bill.fp" method = "post" name = "transaction" id = "transaction" & gt; & Lt; Span style = "color: black" & gt; Receipt Number: & lt; / Span & gt; & Amp; Nbsp; & Amp; Nbsp; & Amp; Nbsp; & Amp; Nbsp; & Amp; Nbsp; & Amp; Nbsp; & Amp; Nbsp; & Lt; Input type = "text" name = "no RCPT" id = "no RCPT" /> gt; & Lt; / Br & gt; & Lt; / Br & gt; & Lt; Label = "student name" & gt; & Lt; Span style = "color: black"

ios - How to send image in Email body -

इस सवाल का पहले से ही एक उत्तर है: < / P> 2 जवाब मैं ऐप पर काम कर रहा हूं, जहां मैं ई-मेल बॉडी में एक छवि भेजना चाहता हूं। मैं एक ही के लिए निम्नलिखित कोड का उपयोग कर रहा हूँ, मेल भेजा है, लेकिन छवि छवि शरीर में नहीं दिखाया गया है, क्या कोई भी मुझे उसी के लिए मदद कर सकता है? // ई-मेल निकाय के लिए HTML फ़ॉर्मेटिंग के साथ एक स्ट्रिंग बनाएं NSMutableString * emailBody = [[NSMutableString alloc] initWithString: @ "& lt; html & gt; & lt; बॉडी & gt;"]; // इसे कुछ पाठ जोड़ें लेकिन आप चाहते हैं कि [emailBody appendString: baseStr]; // इसमें डालने के लिए एक छवि चुनें // यह उदाहरण मुख्य बंडल से आएगा, लेकिन आपका स्रोत कहीं भी हो सकता है UIImage * emailImage = [UIImage imageNamed: @ "face.png"]; // डेटा को एनएसडीटा * छविडेटा में परिवर्तित करना * [एनएसडीटा डेटाविड्टाडेटा: यूआईएमएजपीएनजीआरईपीएनेशन (ईमेल इमेज)]; // एनएसडीटा + बेस 64 एनएसएसटीइंग * बेस 64 स्ट्रिंग = [छविडेटा बेस 64 एन्कोडेड स्ट्रिंग] का उपयोग करके बेस 64 स्ट्रिंग का प्रतिनिधित्व

Javascript Jquery Popup Contact Form - Auto Loading -

When I open the page, I'm trying to get jquery popup contact form to be automatically loaded. . It currently opens only when you click on the link but I want to load it automatically, it is new to me. Am I seeing the correct location of my code? How do I create onload? -Thanks in advance! & lt; Script & gt; $ NoConflict (); jQuery (document) .ready (function ($) {$ ('# myModal'). Reveal ();}); & Lt; / Script & gt; If you want your jQuery fully loaded, use the following code Do: & lt; script type = "text / javascript" & gt; $ (Window) .load (function () {// insert code here // trigger event.}); & Lt; / Script & gt; Documents ready executes the event when HTML loads and DOM is ready , even if all images are on your page Has not been loaded yet. The window load event is executed later when the page is fully loaded, which includes all the images and other objects. Hope this will help you!

ember.js - Ember route not found -

I try to make a webpad with emberjs This app is a router: App.routor.map (function (this.route ("page"); this.route ("menu"); this.resource ('posts', '(' '' '' '' '' '' "" "" "" "Cat"); this.route ("photo");}); and this is post-root: // Post JSON App.PostRoute = Ember.Route.extend ({Model: Functions (Parameters) {return Amber $. getJSON ('http://www.wilhelminaschool.eu/?json=get_post&post_id=' + params.post_id);}}); But I did not find a way to post error Error: Error: Prohibition failed: route post / 11330 not found div class = "post-text" itemprop = "text"> app2 / #post /: post_id i.e. app2 / #post / 11330 , but when the post is processed within the source of /: post_id within the resource post , the link should be App2 / # / post /: post_id i.e ap2 / # / post / 11330 example, < /

jquery - Working with carouFredSel : items getting margin-right added -

Image
To display the carousel for the item, I am using the code given below. 3 items should be displayed with scrolling feature But I am facing the problem when I have less than 3 items in the carousel container tabCarouselContainer.carouFredSel ({auto: false, height: "auto", width: "100 True, Br> Responsive: false, direction: "padding: empty, scroll: {item: 1, easiest: "Linear", fx: "scroll", duration: 500, timeout period: 500}, prev: {button: function () {return tab.find ('. Nav-prev');}}, next: {button: Function () {return tab.find ('.nav-next');}} }; As seen above, I have 2 items but only one is visible. I checked in firebug and is on more items, which is the margin Well-true: 190px so it's going out of the div width and therefore is not showing. Added CSS property for third item via javascript, add some property for it, etc. Any jQuery like The solution was not found.

php - Accessing session variable inside magento files -

I have a custom file in which I am using the session to store the variable and I want to add them to the megentribute files Need to access variables. My custom folder structure: magento / custom / checkmail.php I need to reach the session variable in the Magenta file ie session / calendar / app / design / frontend / base / default / template / continuous / customer / form / login. In the Magento file login.phtml but the values ​​are not going to go near .its near "zero" value how do i go with it How are you saving the value in the session $ Session = Dana :: getSingleton (" core / session ", array (" name "=> gt;" foreground ") ); $ Session- & gt; Set data ("custom_field", 'custom value'); $ YourValue = $ session- & gt; Milladata ("custom_field");

nullpointerexception - Java Null Pointer Exception when creating new instance of class -

I am in the first year of my computer science and I am having a hell of time with a project. I was given the code which lists the number of rooms through an array, and I am preparing a method that allows the user to choose a room, enter his information and reserve the room. I lie in making this issue that actually protects the room ... which is as follows ... Public Zero Booker (Cell [] Room, int nooforms) {// Get settings for the room (smoking, occupied, guest's name / number) displayrooms.info (rooms, numbersoforms); Room Room 1 = New Room (false, false, empty, null, numberoffrooms); // User Input, store each value in the temporary variable Scanner scan = new Scanner (System.in); System.out.println ("Please choose a room"); Int guestRoomNum = scan.nextInt (); room1.setRoomNumber (guestRoomNum); // set room [i] captured = true; Room1.setOccupied (true); // set room [i] guestname name system.out.println ("enter guest name"); String Dictit = Scan. Nxt ()

c# - Web Security not working in Chrome and Firefox -

The user I'm currently using Web Security can log in using this code < pre> if (login to the web site (loginRequest.EmailAddress, loginRequest.Password)) {FormsAuthentication.SetAuthCookie (loginRequest.EmailAddress, false); Var userDetails = new string [2]; UserDetails [0] = loginRequest.EmailAddress; Var Current Users = Roles BetterForce User (loginRequest.EmailAddress); UserDetails [1] = Current user [0]. Ostring (); Return feedback = request Creterespons (HTTPPatts Code. Accepted, User Details); } The login code works, but isAuthentcated always incorrectly returns and the current user name always -1 and all Websecurity methods When I run my application on Chrome and Firefox browsers it is not a good job but it is working well on the IE browser. What did I remember? Is this an issue? or something else? I get a lot of answers from Google, but they have not helped me Any one help According to my knowledge Formsuthconfook.SetAuthCookie (string, bool

functional programming - Clojure. Drop-every? -

Is there a "drop-every" type of function in the closure library? Cheers Takes a lazy list right now and returns a list with every NT item? (drop-every [xx] (lazy- Example: Example: Pre> drop-every 2 [0 1 2 3 4 5]); = (0 2 4) (drop-every 3 [0 1 2 3 4 5 6 7 8]); = (0 1 3 4 6 7) As a side note, drop-end will be an attractive name, because already a In Le-Anith , the is close. Core . However, le- nth always returns the first item and then returns every nth item, whereas the above version of drop-every starts with the nth item of each nth item The original sequence (the first function to leave the first function and every NT item would be easy to write in the above context.)

c# - Object reference not set to an instance of an object, while sorting table column headers -

I get the following error in the browser see jTable followed by code and ran away: Object references are not set for an example of an object. I debug the code and on this line of code newlist = newlist.OrderBy (item = & gt; GetPropertyValue (item, Sort Expression)). ToList (); I get an error that I have confirmed by commenting this line of code. I am trying to do sorting by killing the column header of the table but it is not doing it and gives an error out. Trying to find out on this for a few weeks, but it just does not seem to work. Public JsonResult TopPlayedInVenueList1 (String StartDate = "", String EndDate = "", "" ", int jtStartIndex = 0, int jtPageSize = 0, string jtSorting = null) {try (If Request .IsAuthenticated == true) {string Path = @ "C: \\ 5Newwithdate-1k.xls"; OleDbConnection con = New OleDbConnection (@ "Provider = Microsoft.Jet.OLEDB.4.0; Data Source = '" + Path + " 'Expanded P

multithreading - Interrupt the thread which is making HTTP call in Java -

I am writing a Java program to make an HTTP call in a separate thread. The following code I am implementing in a separate call-able function in the thread pool provider. MyRunnable Public Stabilized Classes Enforces Callback & lt; Boolean & gt; {@Override Public Boolean Call () {HttpURLConnection conn = null; {URL url = Try new URL ("http://www.myserver.com"); Conn = (HttpURLConnection) url.openConnection (); Conn.setConnectTimeout (5000); Conn.setReadTimeout (5000); Conn.setRequestMethod ("GET"); Int response = conn.getResponseCode (); Return reaction == 200; } Hold (IOException e) {e.printStackTrace (); return false; } Hold (exception e) {e.printStackTrace (); return false; }}} For some reason, the server does not respond or the server responds very slowly. Due to the behavior of this server, both connections are time-consuming and do not have time to read So I want to monitor this work (thread is running in the pool executor), and the thread i

c# - How to deploy Website and Web Service in one go? -

I have created a simple book rating website for my C # project. Now I have a web service that I can call VS 02010 In an example I open and a website that I open in the second instance of VS 2010. Now I have to put all this in one package, in which database scripts with SQL are ready Firstly you can create a folder in your application and after that you can give your instructor with the script of the database and that the database script is running in SQL Server and it Code runs on your machine. If you have to deploy your machine then your eye Go to S and upload code to your machine.

python - UnboundLocalError: local variable 'slcount' referenced before assignment -

I am trying to iterate through the results obtained from the database, if the condition is being checked in condition and if If this is true then I want to raise the value for the row in the row : if line Leap unproved Type_ID == "Sick_Love" and row. Employee.leave_eligibility_id == 2: Global slough slcount + = 1 elif line. Save Type_ind == "CASUAL_LEAVE" and the row. Employee.leave_eligibility_id == 2: clcount + = 1 elif line.Slaced. Type_ind == "PRIVILEGED_LEAVE" and the row. Employee.leave_eligibility_id == 2: plcount + = 1 but unboundLocalError: Local variable 'slcount' is referred before the assignment I have also tried "global", but it is showing error below. Name: The global name 'slcount' is not defined "post-text" itemprop = "text "> You did not assign a value for plcount befor using E. Slcount = clcount = plcount = 0: ... for a row in the rows: / p> Python is

web services - How to make optaplanner a REST webservice -

Image
I have just started a way of routing the vehicle using optical links. However, I would like to expose the optoplaner as a web service (preferably comfort). I have read many blogs now that it can be done with Apache camel, although it seems impossible to find a decent example. Are there any known examples that I can see or how can I create it? There are several ways to display this as a rest service: < li>: Comment with JAXB annotation (send XML file over HTTP) then write a Java class with JAX-RS annotation (to define the available methods of rest) is a good reference manual, it is a good reference manual Focusing on REST and allowing you to fix the rest of the interface , As your customer likes it. Posted on servlet container (WildFly, Jetty, ...) Camel: See camel documentation (or book) about camels especially about camels and about camel deployment. Note that camel optometric module is relative young, but its unit tests and works. Other rest of the technologi

iphone - Page Control like in Reminders app iOS 7 -

Image
Has anyone found something with iOS 7 Reminder PageView similar force and behavior? This control means Something found - But it is not absolutely accurate to look forward to someone's help! The best solution I found - This provides the same behavior and UConLionView uses the uidynamics library for the lookout for views.

google app engine - Is GAE request id globally unique? -

Is it global and always unique to a personal application in Google App Engine is request_log_id ? string request id = com.google.apphosting.api.ApiProxy.getCurrentEnvironment () .get properties (). Get ("com.google.appengine.runtime.request_log_id"); We are considering using user session information to correlate with the request of the user after the HttpServletRequest handler in the code. Yes, they are a "worldwide unique identifier" for a request.

validation - Django: how to write code for modelform of user registration -

I want to register form and check that the user's email is new by checking DB. But the problem is that I do not know how to do it. I have 2 questions. 1) When there is a validation error in a specific = true stage, how can I catch the error? Override the clean_field () method of the model? And how can I make it? 2) How can I write efficient and good code for this registration app? The source code below is < # django.db import model class user (models.Model) from # models.py: university = model. Finish ('university') mail = model. EmailField (Exclusive = True) Password = Model Model = model.Carfild () class university (model.model): name = model.ctrild () mail = model.carfold () to difengo.form import modelform class logonform (modelform): class meta: model = user field = ( 'Mail', 'password') class RegisterForm (ModelForm): class meta: model = user def clean_mail (): data = self.cleaned_data ['mail'] if user.objects.filter (mail =

javascript - Undefined is not a function - SPServices -

कंसोल लॉग: Uncaught TypeError: अपरिभाषित एक समारोह index.html नहीं है: 77 LoadCat index.html: 77 (अनाम फ़ंक्शन) index.html: 107 n.event.dispatch jquery.js: 3 r.handle कोड: समारोह LoadCat (बिल्ली) {अगर (बिल्ली = अशक्त!) {var CAML = '& lt; क्वेरी और gt; & lt; कहाँ & gt; & lt; Eq & gt; & lt; FieldRef नाम = "विभाग" / & gt; & lt; मूल्य type = "text" & gt; ' + बिल्ली + '& lt; / value & gt; & lt; / Eq & gt; & lt; / where & gt; & lt; / क्वेरी & gt;'; } Else {var CAML = ''; } var liHtml = "श्रेणी: & lt; चयन करें नाम = \" श्रेणी के चयन \ "id = \" श्रेणी से चुनें \ "& gt;"; । $ () SPServices ({आपरेशन: "GetListItems", async: झूठे, webURL: "पीएसएस / StaffShop /", listname: "श्रेणी", CAMLViewFields: "& LT; ViewFields & gt; & lt; FieldRef नाम = 'शीर्षक' / & gt; & lt; / ViewField

WYSIWYG HTML Editor WPF -

I need to implement a fully developed WYSIWYG HTML editor in WPF with property grid for editing elements elements. I have seen countless examples using rich image / web ideas. The problem with all of them is that the HTML element has no way of communicating with the scene. Is there any control that supports this? I know there is only one that is used by my colleagues but with my present Experience is limited.

facebook - How to detect new posts -

Using Facebook c # sdk I can read my feed data as follows var fb = New Facebook.FacebookClient (long life_token); Dynamic fbFeed = fb.get ("me / feed"); However, I should only be able to find new posts. Is there a way to set up a callback so that SDK indicates my code thanks I do not think such a callback can be set up, but you can iterate through the feed and remove the posts until you encounter the previous post. Do not You can find this by saving the last saved postal ID. Below is a short snippet of code that does this. foreach (different items in data) {var post = (IDictionary & lt; string, object & gt;) item; If posted to ([[id]]] ToString () == Latest PostID {end = true; break;} // app logic continues ...} Alternate form From, you can use the "from" and "up" parameters, such as: "me / feed = up to 10/01 / 2013", which will post before 10/01/2013

c++ - Accessing a std::map of std::map like an array -

I started a std :: map of the std :: map as the following: static std :: map & lt; std :: string, std :: map & lt; Std :: string, float & gt; & Gt; _ScalingMapFrequency = {{"mHz", {{"mHz", 1.0}}}, {"mHz", {{"Hz", 1e-3}}}, {"hertz", {{"mHz", 1e + 3}}}, {"hertz", {{"Hz", 1.0}}}}; And now I am trying to use float values ​​in the following values: std :: cout < & Lt; "Scaling factor is:" & lt; & Lt; _ScalingMapFrequency ["MHz"] ["Hertz"]; When I compile and run the code, but I expect to get "1e-3", then I'm always getting "0". I need to reach the std :: map "_ScalingMapFrequency" as an array, due to this design decision, What am I doing wrong? Please give me some indicators and I would greatly appreciate it. A map can not be a duplicate key, so when you do {"mHz", {{"Hertz", 1e-3

ios - UITableView - SelectedBackgroundView not working in iOS7 with Auto-Layout -

Image
I am using UITableVeiw with static cells in IOS7. Before using the autollections of my storyboard, the table view would look like this https://i.stack.imgur.com/YqJjv.png "alt =" After enabling auto layout in the recorded storyboard, the layout goes to the bower and this is what I have been living with. < / P> I do not have any automatic layout problem that has been presented to me just now that I am not looking at foreground and background with auto-layout. Any help? After the text "itemprop =" text "> The auto-layout seems like the problem was causing me. I added a background view and selected background view programmatically and it works. - (zero) tableView: (UITableView *) tableView willDisplayCell: (UITableViewCell *) cell forRowAtIndexPath: (NSIndexPath *) indexPath {UIView * selectedView = [UIView new]; SelectedView.backgroundColor = [UIColor colorWithRed: 0.604 green: 0.812 blue color: 0.059 alpha: 1.000]; Cell.selectedBac

java - Mule malformed endpoint error -

I am new to deletion and am trying to post a GET request using the HTTP endpoint, But I'm getting the following error "Template Endpoint" ('http.relative.path')] & amp; Langpair = n | IT "resolved in a distorted endpoint" "Failed to route through event point: org.mule.endpoint.DynamicOutboundEndpoint" I have tried the following configuration: get? Q = hello & langpair = EN% 7CIT [work] Get code? Q = # [message.inboundProperties.get] ('http.relative.path')] and langpire = EN% 7CIT [does not work] Get ? Q = # [message.inboundProperties.get ('http.relative.path')] & amp; langpair = EN | IT [does not work] Stack trace seems to indicate that "|" There is no problem with the character. My flow is as follows: & lt; Flow name = "my_first_project flow1" doc: name = "my_first_projectflow1" & gt; & Lt; Http: inbound-endpoint exchange-pattern = "request-respo

ibm mq - Same Application deployed in two different websphere 8 profiles share session? -

I have an application war, I have created two profiles of AppSrv01, AppSrv02 on websphere 8.0.0.0. MQ connectivity in my application, J. 2ee application on Stropes 1.1. I have deployed war on both servers AppSrv01 Reference B as A reference A and APRV 02. I have session listeners in my application which will take care of the total available sessions. The scenario is given below .... Login to the URL localhost: 9082 / A, go to some page in it. Going and logging on the localhost URL: 9082 / b, go to some page in the other tab of the same browser. The URL is going on Local Host: 9082 / A, clicking on some links or URLs from the current page. When it comes to remote debug from the server for session listener ... it shows the stack given below daemon thread [webcontenter: 10] ( Suspension (breakpoint at the line 24 in the session's Controller Listener) Session session information author (HTPsEvenEvent) line: 24WeapSpaceObserver) .sessionCreated (ISession) line: 11

sqlite - Splitting comma separated values into array from optgroup - javascript -

मेरे पास ऐसा कुछ कोड है: var optgroup = $ ('# myselect' ) .val (); Var ऑप्टैरे = ऑप्टगुप.split (','); चेतावनी (optarray.join ( "\ n")); यदि सभी तीन विकल्प चुने गए हैं तो पहली पंक्ति "विकल्प 1, विकल्प 2, विकल्प 3" की तर्ज पर कुछ देता है मैं इसे प्रत्येक विकल्प के लिए एक अलग परिणाम वापस करना चाहता हूं मैंने उपरोक्त कोड की कोशिश की है लेकिन मुझे त्रुटि मिलती है: अनक्यूट टाइप एरर: अपरिभाषित कोई फ़ंक्शन नहीं है मुझे यकीन नहीं है कि त्रुटि क्या है के बारे में है, किसी भी मदद की सराहना की जाएगी एक साइड नोट के रूप में, जब इन मानों को अलग किया जाता है, तो मैं सरणी के माध्यम से चक्र में जा रहा हूं और प्रत्येक विकल्प को SQLite में एक तालिका की एक दूसरी पंक्ति पर संग्रहीत करता हूं। यदि आप संभव चयनों की सूची चाहते हैं तो आप निम्न कोड का उपयोग कर सकते हैं: var list = ''; $ ('# Myselect विकल्प')। प्रत्येक (फ़ंक्शन () {list = list + $ (this) .val () + '\ n';}); console.log (सूची);

adb push command not working android kitkat(4.4) -

I'm a newbie for Android, I want to send files from PC to internal storage of application, ADB push command works fine The Android version is doing but not in KitKat (4.4) saying that permission was denied. I got stuck on this issue, please help me. ADB requires authorization from the device in the recent release See what is mentioned: Since Android 4.2.2, connections to ADB are certified with the RSA keypages . This prevents unauthorized use of ADB, where the attacker has physical access to the device Once you enable the developer mode, the ADB will give the phone a new prompt To allow you to authorize a new connection.

java - Convert spaces to underscores -

I am retrieving a player list from a server and I'm doing stuff with it (later problem related to) . These un-related processes work only if the user name does not have an empty space, but instead of '' the character is '_' I am using this code for loop through character and then find it a '' and, if it is, then it will be replaced with '_' Change, but for some reason it is not known at all? four [] names; (String player name: chatlist) {name = playerName.toCharArray (); For (int i = 0; i & lt; name.length; i ++) {if (name [i] == '') {name [i] = '_'; }} String name S = new string (name); System.out.println (player name + "->" + nameS); } An example of a user name and output is as follows: TestSyear 1 output Testuser_1 Example user output ExampleUser_One Use Replacement All ("\\ s +", "_") . The better way to do this is, otherwise you will change each location wit

Limiting the number of search suggestions, android -

Is there any way to limit the number of suggestions displayed while using the search interface with custom search suggestions? Thank you! This is really very simple. Firstly define a variable for your content provider for reference: public static final string LIMIT_PARAMETER = "LIMIT"; Define something to keep your boundary value in your cursor query @ override string border = Yuri. (LIMIT_PARAMETER); then border to SqliteQueryBuilder : pass the last cursor cursor = queryBuilder.query ( Db, projection, selection, selection order, blank, empty, sort order, border); Then you can use it with contentResolver : getContentResolver (). Query (SOME_CONTENT_URI.buildUpon () .appendQueryParameter (YourContentProvider.LIMIT_PARAMETER, yourLimit) .build (), mSuggestionProjection, mSelection, FilterArgArray, ORDER_BY);

Java code for arranging blocks in rectangular area -

Image
I want to arrange equal size blocks in a rectangular area such as should be number of input blocks and output should be (n1, n2, N3 ...) where n1 is the number of blocks 1 and so on .... For example, for the above image (2,3,2) will be for input 7. Is there some library to achieve this? I want the hurdle to arrange at least rows with each line of the same width. I also want that there should not be more than 4 images in any rows. With the given information, this is happening for example to be a custom job if I Only 7 blocks were given that you have mentioned that I can end with (2,3,2) like you did (2,2,3) or (3,2,2) or (4,2) , 1), etc. With a mathematically well-formed solution, you want to make it more compelling. As the following rows do not have as many rows, the rows are added in the following sequence, new rows can not be inserted between existing rows etc. It is possible to write such algorithms from scratch, but you need to interrupt the probes as much as

php - Mongo faster than MongoClient -

has been disliked after php.net, and it's 3 times faster than the Mongo client! Try it yourself to run the code given below, which includes 1M documents, it will be completed in ~ 20 seconds, which changes with the Mongo client which is ~ 180 sec < / p> & lt; Php function mongo_connect ($ db, $) archive) {$ mongo = new mongo ('mongodb: // localhost'); $ Mongo-> $ db- & gt; Return $ Collection; } $ Mongodb = 'notificator1'; $ Mongocollection = 'torque'; $ Collection = Mongo_connect ($ mongodb, $ mongocollection); Echo $ time = Microtim (true) "\ N"; $ I = =; While ($ i & lt; 1000000) {$ row = Array ('title' = & gt; "test # $ i"); $ COLLECTION- & gt; Save ($ line); ++ $ i; } Dumbo microtom (true) - $ time; ? & Gt; Replace mongo_connect: function mongo_connect ($ db, $ archive) {$ m = New Mongo Client ('mongodb: // localhost: 27017 '); $ Db = $ m- & gt; Select DB ($ db); Retu

c++ - String Permutation -

I'm struggling to find out what's wrong with my current project. First of all, my goal is to try and program a brutefault attack by using all the letters of the alphabet and numbers from 0-9. I stumbled on string permutation, which allows me to generate all the possible combinations in all the letters. String Like abc should give me abc , acb , bca .. I have a character of 36 characters i Want to generate all the combinations in all ways with number / long long combinations like aa a1 a2 15 characters and number combinations. My code is below, which makes all combinations possible in a single line of 36 characters. Also, to give attention, I tried to resize the string, but it only displays the first 5 characters and not all of them. class attack {public: string combination; }; Zero bruteforceAtt () {ent bruteforce; Bruteforce.combinations = "abcdefghijklmnopqrstuvwxyz123456789"; Cout & lt; & Lt; "Brutforce invasion is a go ..." &

android - How to set dynamic channel name -

I'm trying to PubNub setup in your Android app. It works perfectly well except for one thing: How do I set up a dynamic channel name: For example, I need a channel name: App.Count_14. General_channel Account ID (14) will be dynamic which user is logged in. I am using this exact code from PBPN: Thanks for all help! can be a time when you started your PubNub instance, you can subscribe to as many as you want channels Are there. Many developers will subscribe to the global channel for updates to their customers, and then a user channel for personal communication. Right now in your code, you are subscribing to a channel: string channel = "Hello_world"; ... and then later: try {pubnub.subscribe (new string [] {channel}, new callback () { You can feel free to write your own channel name on the basis of your user's ID and subscribe to this channel in addition to your existing channel, or additionally (if this ID continues continuously If ne

c# - How can implement Two-Phase commit with web application in ASP.NET? -

I want to add two-phase commute functionality to my project. I understand the concept and the concept on Google about two-step but it is not able to understand how it can implement. Please tell me how it can apply to my project or suggest any link to me which explains the way to implement it. I developed the project using the MVC web application in ASP.NET. Have done / P> You can use TransactionScope Process from Transaction Constitution Actually, you can define transactions associated with one or more resources (database, transaction-related WCF services, ...) and the framework will take care of the rest. Use {// Resource} (var db2 = new SQL connection (connectionString2)) by using ( db1 = new SQL connection (connection string1)) {// use resource} / / You can use other resources ... // Do not forget this t complete (); } There is no need to rollback back hold (exception before) {// error}}

angularjs - define in require function (requireJS) -

(requireJS, angularJS, angularAMD का उपयोग करना) मेरे मुख्य.जेएस फ़ाइल में मेरे पास: < / P> need.config ({baseUrl: "js", पथ: {'कोणीय': 'लिब्स / एन्ज्युलरज / एन्जेलर', 'एन्ज्योरएएमडी': 'लिब्स / एन्ज्युलैज / एन्जिलएएमडी.मैन' }, शिम: {'एंजुलैम': ['कोणीय']}}); परिभाषित करें (['कोणीतरी'], फ़ंक्शन (एन्ज्युलएएमडी) {var ऐप = कोणीय। मॉड्यूल ("ऐप", []); एप्लिकेशन.controller ("testCtrl", फ़ंक्शन ($ गुंजाइश) {$ scope.message = "udaÅ? ? ओ एसएसी ??! ";}); कोणीयआमडी.बूटस्ट्रैप (ऐप); वापसी ऐप;}); सब कुछ ठीक काम करता है लेकिन जब मैं config फाइल को दूसरे फाइल में कट कर पाता हूं तो मुझे त्रुटियां मिलती हैं: main.js: की आवश्यकता होती है (['आम'], फ़ंक्शन (सामान्य) {define ([ 'एन्जिलएएमडी'], फ़ंक्शन (एन्ज्युलएएमडी) {var ऐप = कोणीय। मॉड्यूल ("एप", []); एप.controller ("testCtrl", फ़ंक्शन ($ दायरा) {$ scope.message = "udaÅ ?? ओ एस ????! ";}); कोणीय

Default method in interface in Java 8 and Bean Info Introspector -

I have a slight problem with the default methods in interface and Bininfo introspector In this example, the interface is: interface < pre> public stable interface interface {default public string getLetter () {return "A"; }} and two classes class A and class B: Public Static Class ClassA Tools Interface {} Public Stable Class Classb Tool Interface {public string getLetter () {Return "B"; }} The PropertyDescriptors print from BeanInfo in the main method app: public static string formatData (property descriptor [PDA] {returnArease.Sistribute} (PDS) .stream () .map ((pd) - & gt; pd.getName ()). Collect (collectors. Joshi (",")); } Public static zero main (string [] args) {try {system.out.println (format data (Introspector.getBeanInfo (ClassA.class) .getPropertyDescriptors ())); System.out.println (formatData (Introspector.getBeanInfo (ClassB.class) .getPropertyDescriptors ())); } Grip (introspection exception e) {e.printStackTrace ();

java - How to use Scanner.nextLine() -

I use this code to do some input in string variable n, after typing I have said, I do not want what I typed to print the program code: string n = scanner NXTIN (); I think after the scanner you type something, but I do not know what it is. EDIT: Thanks for the reply, but I do not know how to stop the scanner here is the program ...: My program: < code> import java.util.Scanner; Public Segment A {Public Stable Zero Main (String AZ []) {String N; Scanner ban = new scanner (System.in); System.out.println ("First Issue:"); N = bananas.nextLine (); }} When I run the program, it appears on the screen: "First digit:", then type, say I type "apple", string n " Apple will be equal ", it's okay, what I do not like, what I do not like is that the string on the screen prints the program, I did not want to do this, what happens like this: First issue: Apple What do I need to print the program Class I: "Without first issue

java - Muti language support in single web page -

Image
I have a requirement that I have never experienced before. I have a web page in which I want to show the sentences of two languages. Like How are you? (In English) In a Spanish language So far, I have used the concept of internationalization that will change the locale and change the entire web page (except for database driven values) In. If the local language is set to Spanish, the entire form will be displayed in Spanish. The requirement here is that both the language string should be displayed next to each. Update: The image of my sample web page is here Another way is to call it ResourceBundle and then moving it to locale , Iam Pass Dutch Locale and then you your resouces folder Resource files should be in my case, I have English, for messages_nl.properties messages.properties / code> for Dutch: locale default locale = new locale ("nl", "nl"); Resource Bundle ResourcesBandle = ResourceBundle.getBundle ("Message",

wordpress - How to Use PayPal to Charge a Commission -

I have a plugin like eBay in WordPress, where people can post their products and sell their products And I'm successful in saving the PayPal response. My database I know how I can configure PayPal so that when someone sells me I get a one percent commission. I have searched everywhere, I have not got anything. TNX You need to become a paypal partner, then you can put your BN code in the PNU button. Generate

android - Custom Cast Button and Behavior Implementation -

Does anyone know if it is possible to use custom ImageButton cast icons, and add MediaRouteActionProvider to repeat the behavior on a ActionProvider this ImageButton ? In my application, I am using ActionBarSherlock with a split actionbars , so I use MediaRouteActionProvider (at least according to my knowledge) Can not use Media Rotor V7 support in the library because it will push many of my items in the hyperbolic menu. In other words how can I hook up the functionality of MediaRouteActionProvider without using MenuItem without using and ImageButton < / P> Any help or consideration would be appreciated! Update This can be easily done by adding MediaRouteButton to the XML and by adding the selector on the button. Then my implementation is like this: Create a mediaRouteButton via xml: & lt; android.support.v7.app.MediaRouteButton android: id = "@ + id / media_route_button" Android: layout_height = "wrap_content" Android: l

java - Can i programatically detect if there are any Chromecast devices on the current WiFi network? -

Is it possible to detect if there are any chromecast devices on the existing WiFi network or not? I have noticed that there is a Cast SDK but I did not find anything about finding the equipment Earlier, this has never worked with SDK, it is possible that I have ignored it. You can search without using the cast button; You need to use the Media Router from the v7 support library (which also needs v7apkapat support) and then get an example of a media router with your code, define a selector (which is basically to reduce the device There is a filter for which you are interested in) and then add a callback to start searching. As the device is searched (asynchronous), your callback will be called. Take a look at this sample, especially what you do that you want.

objective c - Universal iOS app using CocoaPods - which files to check in into Git? -

Image
In Xcode 5, I am developing a universal iOS app - on three different Mac OS machines (where I have to get different user names). also - "admin", "Alex", etc.) My project is through CocoaIPods Uses the SDWebImage library and I'm planning to add some more later. Project in Git-repository at GitHub or BitBucket. I am confused: which files in my project should I check in the git repository. Specifically I wonder that 2 groups of files: related to cocopodes (currently i only podfile and podfile .Lock is checked in , but there are also Pods.xconfig and pods , etc.) and related to Xcode (I I should check in workspace settings I user data - admin - ... ?) What to do Screenshot of Commit Dialog Is: When I run git clean -n -d in my project directory, I see the following: must remove the lock word. Xcodeproj / xcuserdata / word will be removed. Xcworkspace / and my Podfile include the following: Platform: IOS, '6.0' po

angularjs - Can multiple directives for one element share an isolated scope? -

Two instructions on the same element can not have a separate scope for both, but are they both distinct and distinct from their parents You can use? And can they force both the qualities to separate scope? For example, if I have two instructions on an element And one instruction defines a separate scope with a separate asset App.directive ('e directive', function () {return { Restrict: 'E', scope: {localProp: '= prop'}, ...};}); What other instructions can get that radius and can he use the forced asset? Restrict: 'A', link: function postlink (scope, element, ethers) {scope. $ Watch ('localprop') ', Function (newprap, old prop) {...}}, ...};}) My initial attempt (coded as the top) failed. I recommend that you use the instructions for secondary instruction to communicate between the controllers of the instructionsThe first instruction (e-Directorate) maintains a separate scope, while the second auxiliary instruction (o

c# - Call WCF REST Service from Win Form Application -

I am creating a test tool to test my WCF REST services. This return data as JSN To test, I have created a tool on which Jason is on the text box to give the string as input. Therefore, the dataset is diarrhealized for dataset or dataset and show as grid. This is for readability and for data testing. My existing button method like pnlOutput.Controls.Clear (); JsonTextReader Reader = New JsonTextReader (new stringreader (txtInput.Text)); String data = ""; While (reader.Read ()) {data + = reader.Value; } If (Data is included ("Table")) {DataSet ds; Ds = JsonConvert.DeserializeObject & lt; Dataset & gt; (Data); Int topPosition = 0; Foreign Currency (Data Table Datable Databases) {DataGrid Grid = New DataGrid (); Grid Data source = datable; PnlOutput.Controls.Add (grid); Grid Top = top position; Grid With = pnlOutput.Right - 10; Grid Het = (pnlOutput.Height / ds.Tables.Count) - 10; Top position = grid Height + 5; }} And {Datatale DT; Dt = JsonConvert.Des

php - Restful codeigniter limitation with files? -

I use PhilSturgeon RestFul libraries (client and server) I want to download a file from my client, Works with files, but when the file is large (> = 6 mo), I get an empty page with no error Can I handle large files with this system? My code only: $ data = file_get_contents ('my_big_file.bmp'); $ This- & gt; Feedback (base64_encode ($ data), 200); I did not get any configuration with timeout or execution time in both libraries. Yes, you can do the problem you face that your server RAM is fast The maximum will be obtained if the file is too large and possibly if the file processing time takes too long, the script will expire. It has to do with your php.ini settings. To fix this, open your php.ini and change the "maximum_execution_time" number of seconds. 0 is unlimited, but it is not good at the production level, so you feel that this will take time. If you want to be able to process more than 128MB files then replace "memory_limit" t

android - Hex to Ascii conversion -

I hex Bluetooth socket to read ( example: 0x61 0x62 0x63 ). I want to get it related ASCII ( example: ABC ). How to make this conversion? I tried: string s = "0x56 0x49 0x4e 0x31 0x32 0x33 0x46 0x4f 0x52 0x44 0x54 0x52 0x55 0x43 0x4 B 0x00 0x38 "; Stringbilder sb = new string builder (s.length () / 2); For (int i = 0; i & lt; s.length (); i + = 2) {string hex = "" + s.charAt (i) + s.charAt (i + 1); Int is = integer. Persicent (hex, 16); Sb.append ((four) ival); } String string = sb.toString (); It should work: string S = "0x56 0x49 0x4e 0x31 0x32 0x33 0x46 0x4f 0x52 0x44 0x54 0x52 0x55 0x43 0x4 B 0x00 0x38"; Stringbilder sb = new stringbiller (); String [] components = s.split (""); (String component: components) for {int ival = integer.print (component location ("0x", "", 16); Sb.append ((four) ival); } String string = sb.toString ();

javascript - Parsing through XML using JQuery, possibly use JSON instead of XML -

Image
I have a good foundation, but I can not seem to get it to work properly. Demo here: Actually it does not run on the localhost and when I put it in JSFiddle, it keeps telling me: Error 404 We really want to apologize, but there is no such page Of course it is not that I have a setup on JSFiddle right? Maybe not though. In addition, will it be easy to use JSON ? I would love to learn how to do it with JSON. Apart from this, I've never tried to do this with jQuery before so any help would be greatly appreciated! Please check the update. Your baby was wrongly setup. You forgot to select the jQuery at the top left of the jsfiddle site View screenshots In addition to this, you will not be able to use XML throughout the domain This browser is a violation of security. I recommend you use and you will be able to use application / json You may have to specify in your title. Something similar to that. Tell me if you stumble with the other issue.

php - How to determine if date entered by the user is in future? -

How do I know in PHP that the date entered by the user from the current date? i.e. if ($ current_date & lt; $ future_date) {// do all success actions here} other {// show the user that they Have a date selected in the past. } Well change the date string for the first time using the strtotime () function And then check whether the future date value exceeds the current date value. Here is the code snippet: $ today_date = date ('Y-M-DH: I: S'); $ CURRENT_DATE = strtotime ($ today_date); $ Future_date = strtotime ($ future_date); // Received from user input Now you can call your function: if (current_date $$ lt; $ future_date) {// All success activities are here} and {// show the user that they have selected a date in the past. }

c# - Processing XML documentation files prior to Sandcastle -

Consumed by the redcast. Now, by being lazy, I would like to avoid writing XML commentary, if the information that exists is somewhere else. Some of my classes have extra information in the form of custom attributes about their members, so I'm looking for a simple way to automatically add this information to the XML document file before sandcastle processes. My view was that either step in a post-build phase or pre-build Sandcastle project in the assembly, in any way, this build step generated XML document read in a DOM, on the compiled assembly Make some reflection, add this information to the XML DOM and overwrite the original XML file. Now I'm thinking: Am I changing the wheel here again? What is an existing system for adding information to the documentation? If my approach is actually the easiest solution: is there an existing library that wraps the XML documentation file and allows easy modification, or XDocument is my best bet? Note: I found, but