Posts

Showing posts from May, 2011

c# - Can't draw more complex scene using XNA 4.0 and windows forms -

I tried to sample this code by Microsoft, which would allow you to draw an XNA GS 4.0 view of a custom Windows form Allows access to control: . The code works great when drawing a triangle, but when I try to attract a generated trap, it just pulls the X into control. I debug the code and it looks like when I arrive: graphics.GraphicsDevice.DrawUserIndexedPrimitives & lt; VertexPositionColor & gt; (PrimitiveType.TrangleList, Vertices, 0, Vertices.Length, indicies, 0, indicies.Length / 3); This draw function never runs out. I have tested my code in the normal XNA game project and it works 100%. Does anyone have a clue that is going on? Thank you in advance. It seems that the problem was the XNA access profile, just changed it to hiDef and it worked Done! :)

objective c - UIScrollView, how to set size to image size? -

I have UIScrollView, with UIImageView at the top, I have a few things that I'm trying to decide: 1) Initially, the image is scaled to fit the screen (this is good). How can I set a border so that you can zoom out of this point (I do not want to see anyone from the background)? I could not find anything of some sort of maxSize property 2) How can I set that amount to someone who can zoom? I do not want users to do X8 or anything like that. 1) [scrollwidth setminumzscale: float]; 2) [scrollview setmexiumzscake: float];

How do I change images on a jQuery tab when the tab is active? -

I'm using the jQuery tab, and I am using images for each tab instead of text. I would like to change the images when the tab is active The code itself is for the tabs: & lt; Ul & gt; & Lt; Li & gt; & Lt; A href = "# tab-1" & gt; & Lt; Img src = "images / dashboard_off.gif" /> & gt; & Lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "# Tab2" & gt; & Lt; Img src = "images / advertising_off.gif" /> & Lt; / A & gt; & Lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "# tab3" & gt; & Lt; Img src = "images / marketing_off.gif" /> & gt; & Lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "# Tab-4" & gt; & Lt; Img src = "images / office_off.gif" /> & lt; / A & gt; & Lt; / Li & gt; & Lt; Li ...

Adding values from inputs together in jquery -

मेरे पास निम्न तालिका है: & lt; table & gt; & LT; thead & gt; & LT; टीआर & gt; & LT; वें & gt; & lt; / वें & gt; & LT; वें & gt; महिला & lt; / वें & gt; & LT; वें & gt; नर & lt; / वें & gt; & Lt; / टीआर & gt; & Lt; / thead & gt; & LT; tbody & gt; & LT; टीआर & gt; & Lt; td & gt; राइजिंग 1 & lt; / td & gt; & LT; टीडी & gt; & Lt; इनपुट आईडी = "प्रथम इनपुट" / & gt; & Lt; / टीडी & gt; & LT; टीडी & gt; & Lt; इनपुट आईडी = "सेकंडइनपुट" / & gt; & Lt; / टीडी & gt; & Lt; / टीआर & gt; & LT; टीआर & gt; & Lt; td & gt; राइजिंग 2 & lt; / td & gt; & LT; टीडी & gt; & Lt; इनपुट आईडी = "तीसरे अंतर" / & gt; & Lt; / टीडी & gt; & LT; टीडी & gt; & Lt; इनपुट आईडी = "चौथाइनपुट" / & gt; & Lt; / टीडी & gt; & Lt; / टीआर ...

iis 7 - Protecting Executable Download in ASP.NET -

I have executable, I want to restrict it which is capable of downloading. I have a UI trimming so the link is not present when the user is not authorized to perform executable. And I have set a rule in web.config to protect resources from unauthorized downloads, but it does not work. & lt; Location path = "utilities / some tool.ax" & gt; & Lt; System.web & gt; & Lt; Authority & gt; & Lt; Allow roles = "some roll" /> & Lt; Deny users = "*" /> & Lt; / Authorization & gt; & Lt; /system.web> & Lt; / Location & gt; When I try to download the resource, I use the login page, which expects that the user is not related to that role in downloading the resource should be able. / P> I can change the rule in web.config, so it allows a specific user, and I am able to reach the executable with that specific user, but that will not work, because I Need to modify the access rules for each user added...

PHP - split arrays if value 2 is higher than 1 ( -

I have worked hard this night to find out how to divide my arrays into multiple arrays. / P> I can have this value $ array = array (array ("apple", 10), array ("ball", 5)); Then I want to have 10 arrays in the apple where the value is "apple" and the ball has 5 arrays, where the value is "ball" Then I It came with this, but production seems very strange .. $ newarray = array (); For foreign currency ($ array $ val): ($ i = 1; $ i & lt; = $ val [1]; $ i ++): $ new $ [$ i] = $ val [0]; Endfor; Endforeach; Print_r ($ newarray); Ball [4] = & gt; Ball [4] = & gt; Ball [4] = & gt; Ball [4] = & gt; Ball [5] = & gt; Ball [6] = apple [7] = & gt; Apple [8] = & gt; Apple [9] = & gt; Apple [10] = & gt; Apple) Hope you guys will understand my question, and hopefully nobody can understand it. In advance, thanks. Here can help: $ result = array ( ); Forex Currency ($ $ as Enterprise Sub) {$...

upgrade - Transfer data to new database version android -

I'm trying to write a function that will take the current information in the database and keep it in the new version. is. public void updateTable (SQLiteDatabase db) {Cursor C = db.rawQuery (select tbl_name from sqlite_master where tbl_name = '"+ tableName +"' ", null); If (c ! = Null & amp; amp; amp; c.getCount ()> 0) {c = db.rawQuery ("Choose + to +" + + Table Name, blank); ArrayList & lt; Transactions & gt; TempList = New ArrayList & lt; Transactions & gt; (); while (c.moveToNext ()) {transaction T = CreateTechnication (C); if (T! = Null) tempList.add (t);} Droptable (DB); For the createTable (Transaction T: tempelist) {addOccurrence (t);}} and {new runtime exception throw ("No new table to update This method gets the database given to the on-upgrade method. Upgrade to Public Zero (SQLiteDatabase DB, Int Old Warren, It Newversion {Switch} (NewVersion) {Cases NEW_VERSION_NUMBER: transTable.updateTable (db); br...

c++ - Different matrix structs passed by parameter -

"itemprop =" text "> I have a function in a genericObject class that needs to be a struct as a parameter, but going to this struct All these structs are provided by one of their child classes to be the same member, but they will have different matrix sizes This function meets the structs (obviously incorrect). GenericObject Zero :: SetTexture (struct * _myStructOffset) {for (int i = 0; i & lt; stateNumber; i ++) {(for int j = 0; j & LT; indexNumber; J ++) {SetTextureOffset (i, j, _mystructOffset [i] [j] -> xTex0, _myStructOffset [I] [J] -> xTex1, _myStructOffset [I] [J] - & Gt; yTex0, _myStructOffset [I] [J] -> yTex1, 100 / * _ myGenericOffset-> imageW * /, 100 / * _ myGenericOffset-> imageH * /); } GetMyAnimatedSprite () - & gt; Set animationist (); }} structure example: struct button data {float xTex0; Float yTex0; Float Extex 1; Float yTex1; } Button Offset 1 [3] [1]; and should work in some way like this: Zero bu...

- Where Developers Learn, Share, & Build Careers

I am trying to add an AJAX function to a script that essentially does 2 things: Step 1: Determine whether it is necessary for users to search or create a new step 2: Based on selection 1, it will either go to the selected script (it works in part) or a new function (That part does not work, even then). Now, I know that the second function works entirely because I used to call it directly in anchor tag and there was no problem in it, so I want to know how I am trying to all, this function itself Understands Here's what I've done so far: function changecm () {var txt = 'Select an option to continue: & lt; Br> & Lt; Input type = "radio" name = "type" id = "type" value = "search" style = "font-size: 22px;" & Gt; & Lt; Br> & Lt; Input type = "radio" name = "type" id = "type" value = "create" style = "font-size: 22px;" & Gt; '; $ .prompt (...

jquery mobile - Disabling buttons in jQueryMobile - SimpleDialog2 dialog -

I am using jQueryMobile - SimpleDialog2 However, I want to disable the button according to something > Ok, I'm not sure this is the best way, but I Unable to get 'disabled' effect Close: (disabled)? Wrong: True, Subject: (Disabled)?

javascript - Getting wrong screen height when trigger orientationchange event -

जब मैं इसे Portrait या लैंडस्केप । window.addEventListener ("अभिविन्यास", फ़ंक्शन (इवेंट) {rotateScreen ();}, झूठी); फ़ंक्शन रोटेटस्क्रीन () {चेतावनी (विंडो। औचित्य) चेतावनी ($ (खिड़की)। हल्की ())} जब मैं इसे पोर्ट्रेट पर घुमाने के लिए, मुझे मिल जाता है 0, 294. जब मैं इसे लैंडस्केप पर घुमाने के लिए, मुझे 90, 41 9 मिलता है। यह आंकड़ा उलट है, मैंने इसे $ (document) में लपेटने का प्रयास किया है .ready () लेकिन यह काम नहीं करता है। $ (दस्तावेज़) .ready (फ़ंक्शन () {चेतावनी ($ (विंडो)। हाइट ())}) ऐसा लगता है कि जब मैं मोबाइल को पोर्ट्रेट पर घुमाऊं, तो मुझे लैंडस्केप की ऊंचाई मिलती है, और जब मैं मोबाइल को लैंडस्केप पर घुमाने देता हूं , मुझे पोर्ट्रेट की ऊंचाई मिलती है क्या कोई इसे ठीक करने का सुझाव दे सकता है? धन्यवाद आकार बदलना अभिविन्यास परिवर्तन ईवेंट के बाद ईवेंट शुरू हो जाता है हालांकि आकार बदलना अन्य चीज़ों जैसे वर्चुअल कीबोर्ड दिखाने से भी शुरू हो सकता है। इस प्रकार गोल करने के लिए हम पहले अभिविन्यास परिवर्तन के लिए सुन सकते ...

- Where Developers Learn, Share, & Build Careers

Hi, I want the viewcontroller to appear for a set time, then dissolve a new view controller. Perhaps the use of nstimer The easiest way: [self performSelector : @selector (toNewViewController :) with object: after zero: time insecond]; That's it. You only have to type the controller to see the controller transition to see the controller transition in method.

- Where Developers Learn, Share, & Build Careers

I am very new to CRM development, I was trying to, I am about the code below Confused slightly, please check: var xp = Xrm.Page; Function Onload (Reference) {var accountId = xp.data.entity.getId (); MostRecentQuery = "/XRMServices/2011/organizationData.svc/ContactSet $ ​​selection = FullName, JobTitle, EMailAddress1, Telephone1 & top $ 1 & $ orderby = CreatedOn desc & amp; $ filter = ParentCustomerId / ID eq GUID '' + ACCOUNTID + "'; GetContact (most recent," most "); ....} The Javascript function is implemented when AccountForm The first row gets the account ID The next line is the ODATA query ContactSet In this query, I get confused here, how can we get ContactEntity based on the GUID of AccountEntity I am doing this? Check after I got the answer to this question! Actually there is a look 'parent customer' representing Contact Identity, the unique identifier of the account or contact associated with this con...

- Where Developers Learn, Share, & Build Careers

I have 40 tables that look like the following, and each table has 30 million records. Table rodeata : pk ( carogirdid , time ) range-id Time islampled value -------- --------------------------------------- ----------- - 1 2012-07-01 00: 00: 00.000 0 - & gt; 1 65.36347 1 2012-07-01 00: 00: 11.000 0 80.1672 9 1 2012-07-01 00: 00: 14.000 0 29.1 9 716 1 2012-07-01 00: 00: 25.000 0 - & gt; 1 7.05847 1 2012-07-01 00: 00: 36.000 0 - & gt; 1 98.08257 1 2012-07-01 00: 00: 57.000 0 75.35524 1 2012-07-01 00: 00: 59.000 0 35.35524 As of now, IsSampled Column is 0 for all records. I need to update the records, so that for each category ID and for each minute range, record with Max (value), min (value) and IsSampled in the first record Must be 1 for I have created the following procedural queries, but it takes a lot of time to run. (Approximately 2h 30m for each table) announcement @ start datetime DECLARE @endRange datetime DECLARE @endTime datetime SET @startRa...

In php, mysql how to run a loop only if record exist -

I have a php script that contains the user's selection / calculated based on input and range of form Rilods, I run them If no record is done in additional table and not on farm reload, then a loop will be run with this status. My partial php script bills - detail.php: This hope seeks Sufi: & lt; Html & gt; & Lt; Top & gt; & Lt; Title & gt; Cash Bill Details & lt; / Title & gt; & Lt; Script language = "javascript" & gt; Function reload (form) {document.location.href = 'bill-detail.php'} function showecr (str) {if (window.XMLHttpRequest) {// code for IE7 +, Firefox, Chrome, Opera, Safari xmlhttp = New XMLHttpRequest (); } Else {// code for IE6, IE5 xmlhttp = new ActiveXObject ("Microsoft.XMLHTTP"); } Xmlhttp.open ("GET", "billecr.php? Q1 =" + str, false); Xmlhttp.send (); } & Lt; / Script & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt ;? Php $ con = mysql_con...

- Where Developers Learn, Share, & Build Careers

I am working on VMware vCenter on a custom portal through the VMware Orchestrator API. I am using Sven to ask the SOAP API (Oversight) of Oversstarter and it is to return valid data ... especially an XML that contains all virtual machines. What is the easiest way to capture the answer in the Rail model? The XML structure of the response is below ... & lt; Soapenv: envelope xmlns: soapenv = "http://schemas.xmlsoap.org/soap/envelope/" xmlns: xsd = "http://www.w3.org/2001/XMLSchema" xmlns: xsi = "http: / /www.w3.org/2001/XMLSchema-instance "& gt; & Lt; Soapenv: body & gt; & Lt; FindResponse xmlns = "http://webservice.vso.dunes.ch" & gt; & Lt; FindReturn & gt; & Lt; TOTALCOUNT & gt; 4 & lt; / TOTALCOUNT & gt; & Lt; Elements & gt; & Lt; Items & gt; & Lt; Type & gt; VC: VirtualMachine & lt; / Type & gt; & Lt; ID & gt; Vc.demo.local / VM-37 & lt; / Id ...

php - Even CURL function can't scrape some urls -

I am using curl to scrap the html of the url. It uses 80% URLs which I use. But some URLs do not seem to "scrape", for example, when I try to scrape, it does not work. The website is loading and in the end it does not return any results. The problem is that this is my code: if ($ _ POST ['submit']) {function curl_exec_follow ($ ch , & Max $ max = null) {$ mr = $ Maxredirect === Tap? 5: difference ($ max); If (ini_get ( 'open_basedir') == '' & amp; amp; ini_get ( 'safe_mode' == 'off')) {curl_setopt ($ ch, CURLOPT_FOLLOWLOCATION, $ mr & gt; 0); Curl_setopt ($ CH, CURLOPT_MAXREDIRS, $ MR); Curl_setopt ($ CH, CURLOPT_RETURNTRANSFER, true); Curl_setopt ($ CH, CURLOPT_SSL_VERIFYPEER, incorrect); } And (curl_setopt ($ ch, CURLOPT_FOLLOWLOCATION, false); if ($ mr & gt; 0) {$ original_url = curl_getinfo ($ ch, CURLINFO_EFFECTIVE_URL); $ Newurl = $ original_url; $ Rch = curl_copy_handle ($ ch); Curl_setopt ($ rch, CURLOPT_H...

Google Javascript tutorial like Mozilla developer Center -

I'm just getting started, so forgive me for any mistake. I have a JavaScript documentation similar to Google, like Mozilla has. Please suggest ... The Mozilla Foundation develops javascript, So they have the best document for this ...

- Where Developers Learn, Share, & Build Careers

I'm making my first Windows Mobile application I have a login screen - I'm just wandering, 24 hours a day How does the user sign in, where will it ask for a username and password? The application was opened / closed during the day, and I only want to put my certificate in the morning. Thank you You can capture the database for the first time, and check the time separately from the first log You can. Time, if time varies more than 24 hours, delete the row in the table

objective c - Background color of NSSearchfield not working -

I have an NSSearchField and I want to change its background color, but I am not able to do it, Tried: 1) I tried to set the drawback area and then set the setbackgram coiler but the value of the dockback ground is always wrong or I try to set it a trough code or nibb. (I do not know why?) 2) I tried to set NSText background coler but it does not look good because it is not wrapping the entire NSSchild in extreme corners, where small search The icon and the cancel mark are present, which remain unstable. 3) I want to see that the color of the searchField is lying, so I have reduced the alpha value of the search film, which looks good, but the alpha value of the text also decreases Therefore the alpha value of the text is always to be 1. NSSearchField is the extension of NSTextField, then NSTextField Expanding of NSView, It is possible not to recreate, but to create custom colors and overwrite the drawRect function and paint with background color.

- Where Developers Learn, Share, & Build Careers

मेरे पास एक multimap & lt; key_type, value_type & gt; है और मैं जानना चाहूंगा कि क्या कोई विशेष कुंजी सबसे अधिक समय में मानचित्र में प्रतीत होता है। मुझे पता है कि multimap.equal_range (key) को एक iterator को खोजने के लिए वाले रेंज की शुरुआत और समाप्ति पर कॉल कर सकता है कुंजी लेकिन मुझे यह जानना चाहिए कि क्या श्रेणी.first और range.second के बीच एक ही तत्व है। क्या वहां है यह range.end के बराबर है, यह देखने के लिए range.first मान को बढ़ाना से बेहतर तरीका है? चूंकि multimap :: iterator द्विदिश है, यह वृद्धि को पूर्ववत करने के लिए कोई बड़ा सौदा नहीं है, लेकिन यह ऐसा करने के लिए ढलान लगता है। क्या आप जांच सकते हैं कि == 1?

- Where Developers Learn, Share, & Build Careers

I am currently working on a school project and I think that is to gather some problems with the MPEG file I The scope of my project is: 1) Split the MPEG file into pieces of many fixed sizes. 2) Collecting some of them and leaving some part. Problem 1: When I run the file in the media player, it will play the video until it reaches that segment which I left Give it Example: Chunk = ["yui_1", "yui_2", "yui_3", "yui_5", "yui_6"] Duration of each segment: 1 second * If you think I have left the "yui_4" section. * If I went to collect all the parts except "yui_4", then the video will play the first 2 seconds before being hanged throughout the period. Problem 2: When I gather the first part off the part, it is unable to run the whole MPEG file is. Duration of each piece: 1 second Example: wheel = ["yui_2", "yui_3", "yui_4", "yui_5", "yui_6...

java - Stuck on this bit of code -

What I'm doing is creating a command line "Game" where there is a 3x3 grid where you have "1" By typing direction (top, bottom, left, right) For example: 0 0 0 0 0 0 0 0 0 I have made it, if 1 is on the edge of the array then it is not allowed to go beyond the boundaries (read: resulting in an index error). I am completely lost whenever I try to move right, I receive the following: Exception in thread "main" java.lang. ArrayIndexOutOfBoundsException: Logic.setMove at 3 (Logic.java:87) on Logic.getMove (Logic .java: 10) at GridGameMain.main (GridGameMain.java13) This is my code: public class GridGameMain {static int [] [] board = new int [3] [3]; Public Static Zero Main (String [] Args) {Board [(Int.) (Math.Rendam) * 2.5)] [(Int. (Math.Rendem) * 2.5)] = 1; For (int i = 0; i I'm not sure that I can not move right when I can move up, down, and just fine. Please tell me that I am not mad! I think there is a problem, to make...

- Where Developers Learn, Share, & Build Careers

निम्न कोड / ^ (http | https): \ / \ / [ एक-Z0-9] + ([\ - \] {1} [एक-Z0-9] +।) * \ [az] {2,6}। (: [0-9] {1,5}) ? (\ /.* â ???? ????)? $ / Ix सभी प्रकार के डोमेन को मान्य करता है। मैं मान्य करना चाहता हूं केवल एक डोमेन या सबडोमेन (उदाहरण के लिए .cu.cc या .CO.cc )। आप इसे केवल अपने डोमेन रीजएक्स के अंत में जोड़ सकते हैं: (? & Lt; = \। Cu \ .cc) $ यह एक सकारात्मक रूप से पीछे है

android - Other Maps API in Phonegap? -

Can I use another Maps API in PhoneGrap next to Google Maps? I look at the tutorial and have a code http://maps.googleapis.com/maps/api/staticmap?center= "+ position.coords.latitude +", "+ position. Coords .longitude + "& amp; Amp; Zoom = 11 & amp; Size = 300x300 & amp; Sensor = false As far as I can understand, I can simply convert it into another API URL correct? Yes, you can use any other map, as long as it runs in mobile Browsers are capable of If you are using the latest version of PhoneGrap, make sure you have a new API URL.

- Where Developers Learn, Share, & Build Careers

Chrome is a way to get battery objects in the pop up window I use this code To create pop ups chrome.windows.create ({'url': 'mypop.html', 'type': 'popup'}, function (window) {}) ; But there is a problem redeeming the battery object using this code var battery = navigator.webkitbattery; When I am calling a javascript file on mypop.html page Is this a Chrome security issue that rejects the battery object on the popup page? It seems that it has been removed from Chrome because Nevigetrkvebkitbatri Is undefined

c# - Use TAP with wcf EAP generated proxies -

I have a Silverlight 5 app, which uses a WCF service. Proxy Client, which is generated, only Asynchronous Methods (by default, when SL is generated from the client). I want to use Task-based asynchronous pattern (TAP), which is currently within VS2012RC What is the best way to consume async methods from generating client proxy ? (The point is, WCF proxy generator creates code that is based on event based on asynchronous pattern (EAP) and not TAP ....) I have found a solution for this Look at the code below: div class = "post-text" itemprop = "text" Public category MyDataListProvider: IMyDataListProvider {Private & lt; ObservableCollection & lt; IMyData & gt; & Gt; MyDataList; Public works & amp; Lt; Overview section & lt; IMDData & gt; & Gt; GetMyData () {Task Complex Sources & lt; OverviewCollection & lt; IMyData & gt; & Gt; TaskCompletionSource = new task end source & lt; Overview section ...

EMACS how to reset buffer-modified flag when buffer is equal file -

Is there a way to reset the buffer-modified flag when the buffer is equal to the file but marked as modified? In this case, I want the EMACs not to ask me to save. Install you diff , it will: "Buffer modified flag update" (interactive) (let * ((buffer (current buffer) (basefile (or (buffer-file-name buffer) (error "buffer% S does not have any related file "buffer") (tempfile (make-temp-file "buffer-content-")) () with buffer buffer (save-restriction (wide) (writing area (point-min) (point -most) temporary zero 'silent)) (if (= (call-process " ("File buffer matches file")) (message "buffer does not match")) (Delete file temp file))

c# - Dummy ObjectList generator for unit testing -

Can anyone also explain that there is a good framework in C # that will create dummy objects and lists so that we can Do not need to manually generate stub data? You can try that its purpose is to produce a fast generation of test items. If you have an employee class: public class employee {public string name {get; Set; } Public Date Time Birthday {Received; Set; }} Preparing a list of 10 employee items is as simple: var employee = builder & lt; Employee & gt; CREATEListOfSize (10) Build (); This will generate a unique incremental value for all areas of the object: name 1 7/12/2012 Name 2 7/13/2012 Name 3 7/14/2012 ... In addition, the NBuilder has a powerful powerful fluent interface, which allows custom value to be set for any generated object: var employee = builder & lt; Employee & gt ;; (E = & gt; E.Dress = Builder & lt; Address & gt; Garbage New) (.) With (E => E. name = "Sergey"). Build ()). Builder (); ...

datetime - Python: Effective way to convert ambiguous hours into time object? -

I have a list of strings, which is as follows: 4: 00- 5: 00PM 11: 00-2: 00 PM 12: 00-1: 00 PM 11: 00-1: 00AM And I try to find an effective way of creating the object twice (I think this is the only way to keep track of a limit of time, which I will later add to a date object). It is clear to humans what we mean 11: 00-1: 00 AM, but considering what is an effective way to change it: datetime.time (23, 0 ) Datetime.time (1, 0) Take my current view for the first time, and prepare a PM and AM version, take timeliness with the end time (which is specified) , And less than two differences are correct. This is a simple implementation. & gt; & Gt; & Gt; Def Timelines: ... T1, T2 = Timestar Split ("-") ... Timeformat = "% I:% M% p" ... t1AM = datetime.datetime.strptime (t1 + " AM ", time format) ... t1PM = datetime.datetime.strptime (t1 +" PM ", time format) ... t2 = datetime.datetime.strptime (T2, time format) ... ......

Find factorial of large numbers in Java -

I tried to find the factual number of a large number eg Using a loop and double data type in 8785856 in a specific way. But it is displaying infinity as a result, maybe because it exceeds its limit. My code: class abc {public static void main (string [] args) {double fact = 1; (Int i = 1; i & lt; = 8785856; i ++) for {fact = fact * i; } System.out.println (facts); }} Output: - Infinity I'm new to Java but some of the Io concepts Have learned - Ningling and all. public static zero main (string [] args) {BigInteger Facts = Bigtega. 1); For (int i = 1; i & lt; = 8785856; i ++) Fact = facts Multiply (BigInter.Voof (I)); Println (fact); }

asp.net - how to open a popup windows and cause a full postback in the parent window after closing the popoup -

In ASP.net, I want to click on a button to open a popup window. After the popup window, I want to do a full postback in the original window. How can I do this? Thanks in advance. Write the script below on your popup: window.opener. PostBack (); // Where is the custom method of Postback Opener / Parent Window You can either call it at OnUnload () in the event of your popup or window.close () After any other method; . You can apply the PostBack () method to the opener: Function Postback () {var btn = document.getElementById ('& Lt;% = SomeButton.ClientID% & gt; '); If (btn) btnclic (); // or // __do postback ('SomeButtonId', 'logic'); }

objective c - get ssid from access point in ios -

I want to receive some non-alerts from access points like MAC Address (BScID). I try this code, but when I connect to a network, it only works. - (ID) fetchSSIDInfo {NSArray * ifs = (id) CNCopySupportedInterfaces (); NSLog (@ "% s: Supported Interfaces:% @", __func__, ifs); ID information = zero; (NSString * ifnam in ifs) {info = (id) CNCopyCurrentNetworkInfo ((CFStringRef) ifnam); NSLog (@ "% s:% @ = & gt;% @", __func__, ifnam, info); If (information and amp; info]] {break;} [information released];} [ifs release]; return [information autorelease];} despite being connected How can I get a BCID ID from the espresso number, is it possible? And the answer is no. You can only get the connection data. You can use some private libraries, however It will not be approved by Apple.

- Where Developers Learn, Share, & Build Careers

I want to store the indicators in a deck that looks like this: deck & Lt; OfImage * & gt; Pointer Dick; Zero testApp :: iTakeAPointer (iGes * and Pointer) {cout & lt; & Lt; "ITAKAPointer" & lt; & Lt; & Amp; Pointer & lt; & Lt; Endl; PointerDeque.push_back (pointer); Cout & lt; & Lt; "Pointerdec.back ()" & lt; & Lt; PointerDeque.back () & lt; & Lt; Endl; } When I run it, I get it (the function is called on the queset): key pressed 0xbffff240 iTakeAPointer 0xbffff240 pointerdek.back () 0x9f2e08 Because deque.push_back () creates a copy My question is: How can I get reference to 0xbffff240 in this context, in the deck? Edit: Thanks. Sometimes you do not see wood for trees. Your diagnosis is incorrect. This is printing the address of the pointer, not the address that holds the pointer (which you want): cout & lt; & Lt; "ITAKAPointer" & lt; & Lt; & Am...

- Where Developers Learn, Share, & Build Careers

I am a Java developer. I always wanted to write my own colonel and wanted to develop a small OS, I do not know What this kernel or OS will look like or what they will do, but I have something useful to contribute to the world of this huge and beautiful open source. I want to do this but my problem is that I do not know how to start. I had studied C / C ++ in my college days, now I do not remember much in these programming languages ​​but I can brush to start. I know that this journey will be difficult and long, but every long journey begins with one step. To ensure that I take the right steps in the right direction, I need to guide the people towards helping the experts on this forum. I am not expecting spoon food, but on your thoughts and context of good books and links that can help new beginners like me to start with such programming. Thanks Honestly: I do not know what this kernel or OS will look like or what will happen, but I have to develop something useful to co...

php - parsing rss feed gives 500 internal server error -

When I try to parse Google RSS feed, I get a network error: Chrome and Firefox developer 500 internal server error tool. The first part of downloading the RSS feed (with curl) works fine. I found this example here: Can someone focus on doing me wrong? Thank you. & lt ;! DOCTYPE html public "- // W3C // DTD XHTML 1.0 Strongly //n" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> & Lt; Meta http-equiv = "content-type" content = "text / html; charset = UTF-8" /> & Lt; Title & gt; Untitled document & lt; / Title & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt ;? Php if (function_exists ("curl_init")) {$ ch = curl_init (); //curl_setopt($ch,CURLOPT_URL,'http://www.joevasquez.info/feed/ '); Curl_setopt ($ c, CURLOPT_URL, 'http://news.google.com/news?hl=en&topic=t&output=rss'); Curl_setopt ($ ch, CURLOPT_RETURNTRANSFER, 1); // curl_setopt ($ ch, CURLOPT_HEA...

- Where Developers Learn, Share, & Build Careers

Image
As the VS2010 Task List scans the active file only for comments tokens and bookmarks if the developers run on different drives / paths Project is How can you solve such problems? We use a bugtracking tool, but what would be the best way to manage Open Tudo for a project? Develeopers are common to use such tags as "TODO" in the code. Nowadays we use Pragmas, but we want to get rid of them to get less warnings in our night exam. itemprop = "text"> For proper "to-do" management, we use GIRA, but it is called "to-do" management It is a little dissatisfied. When you want to manage the chain that works in teams, you have to start looking at third party devices. If you want a Visual Studio integration, the Visual Studio Team System is designed for this, but I have not had any experience with this, there will be no more comments from this. The last time I have experienced another tool, but since I finally used it, a lot has changed ...

MySQL error code: 1175 during UPDATE in MySQL Workbench -

I'm trying to update this column visited , give it 1 value. I am writing a statement in MySQL workspace, and in SQL Editor from inside the workbook. I am writing the following command: UPDATE tablename SET column name = 1; This gives me the following error: You are using Safe Update mode and you tried to update without a table that was Uses a key column, disable safe mode, toggle options .... I have followed the instructions, and I have chosen the safe update option Delete from edit menu then Preferences then SQL Editor In and click. The same error still appears; I am not able to update this value. Please tell me what is wrong? It seems that your MySQL session is set, this means that where you have a key in the block ( For example, you can not update or delete records without specifying the primary key ). Try: SET SQL_SAFE_UPDATES = 0; Or you can modify your query to follow the rule (use the primary key in where volume . )

How to filter specific row in mysql table? -

Believing that I have a table on which the column is "time", every five minute date ticket, such as : Time 20120701 00:00:00 20120701 00:05:00 20120701 00:10:00 20120701 00:15:00 .... But intervals are sometimes longer than 5 minites between rows, such as 20120703 00:00:00 20120703 00:15:00 Is it possible to combine the result with just one esquito sentence? Try it Select the time from the table, where is not the time (include T1 in the form of T1 in the time of T1. T1 on T2 as the title in the table. Time = t 2. time-interval 5 minutes)

php - How to render a view/template inside CakePHP Shell? -

I am playing several chronos in the form of cake php and I need to make some documents there. Some of these are HTML which are going to be converted to PDF, some of them are email with HTML content. I have templates / ideas for this and I am able to present them through the controller. How can I provide them in the shell? Currently I am using some strings to replace some tokens, but I need it, but it is dirty and I need functionality like templates like loops and conditions Smarter has smerty- & gt; Fetch () CodeIgniter in $ this- & gt; Load-> View () is how is done in kppp? In Cake 1.3: Application :: Import ('Controller '); $ This- & gt; View = new view (new controller (wrong)); $ This- & gt; View- & gt; Visibility = 'element'; Copy $ this- & gt; View- & gt; Element ($ name, $ params); 3.x in cake $ view = new view (); Copy $ view- & gt; Element ($ name, $ params);

Spring Batch: OnSkipInWrite prints the log twice ??? How ? -

Im being experiencing a strange situation while performing a spring batch. I used my workstation execution to use "skippable-exception-classes" & lt; Step id = "readyFileStep" next = "fillRecordsCounterStep" & gt; Is configured to use. & Lt; Tasklet & gt; & Lt; Chuck Reader = "Staging ID Reader" author = "Customer ID Record Comparison" short-interval = "50" left-border = "200" & gt; & Lt; Currents & gt; & Lt; Stream ref = "flatFileRecordWriter" /> & Lt; / Currents & gt; & Lt; Skippable-exception classes & gt; & Lt; Class = "java.lang.Exception" /> Include & lt; / Skippable-exception classes & gt; & Lt; / Share & gt; & Lt; Listeners & gt; & Lt; Audience Rif = "Ready FlatSquip Sketch Listener" / & gt; & Lt; Audience Rif = "Ready Flat FileStep Listener" /> & Lt; / Listen...

sharepoint - How to get SPServer's machine name? -

Image
Usually in SharePoint, the name of an SPAserve machine is equal, but if we use it Stsadm.exe -o renameserver -oldservername & lt; OldServerName & gt; -Ness Sercer Name & lt; NewServerName & gt; change Name the server for, so how can I tell the name of an SPAs detecting agent? If you use PowerShell, you can use any of these two commands : [System.Net.Dns] :: GetHostName () $ env: COMPUTERNAME

bash - Why does awk print the full line when using eval? -

I am currently in the process of modifying a large BASH script which installs / checks a series of packages in a few different Districts. (Mainly Redhat and Debian based). To handle some differences between distros (such as RPM versus DPKG, Wiim Vs, APT, etc.), I am trying to load some variables with different command strings so that the script is filled with If it is Debian, otherwise this statements, though it appears that it does not like to put awk inside an eval statement, and I do not know why it may be. Example # Examples DPKG - List Product # ii bash 4.1-2ubuntu3 GNU Born Again DPKG - List | Grep 'bash' # Output Bidding Entries in DPKG CMD = "DPKG - Listing | GRP 'Beash'" EVALE $ CMD # Production as expected, DPKG-list as above. Awk '/^.i/ {print $ 2}' # Output as expected, a list of package names Cmd = "dpkg --list | awk '/^.i/ {print $ 2}' 'eval $ cmd # Print out the full output from DPKG for each line that m...

- Where Developers Learn, Share, & Build Careers

I am currently in the process of modifying a large BASH script which installs / checks a series of packages in a few different Districts. (Mainly Redhat and Debian based). To handle some differences between distros (such as RPM versus DPKG, Wiim Vs, APT, etc.), I am trying to load some variables with different command strings so that the script is filled with If it is Debian, otherwise this statements, though it appears that it does not like to put awk inside an eval statement, and I do not know why it may be. Example # Examples DPKG - List Product # ii bash 4.1-2ubuntu3 GNU Born Again DPKG - List | Grep 'bash' # Output Bidding Entries in DPKG CMD = "DPKG - Listing | GRP 'Beash'" EVALE $ CMD # Production as expected, DPKG-list as above. Awk '/^.i/ {print $ 2}' # Output as expected, a list of package names Cmd = "dpkg --list | awk '/^.i/ {print $ 2}' 'eval $ cmd # Print out the full output from DPKG for each line that m...

javafx-2, remove focus highlighting via CSS -

Image
I want to delete the blue border which focuses the tableview when this focus is on. I checked in caspian.css, that most components like buttons and textfield do something like this: .table-view: focus {-fx-background-color: -fx-focus -color, -fx-box-border, - fx-control-inner background; -fx-background-insets: -1.4, 0, 1; -fx- background-radius: 1.4, 0, 0; / *** / -fx-padding: 1; / * 0.083333em; * /} My question is on CSS, in the end. Can I override this pseudonym specification in my stylesheet instead of trying to change colors to transparent? Yes you can do it in your stylesheet with the JavaFX CSS properties of your choice The same CSS selector defines: .table-view: focus {-fx-background-color: red / * or transparent or other favorite color * /, - fx-box -border, -fx-control-inner-background; -fx-background-insets: -1.4, 0, 1; -fx- background-radius: 1.4, 0, 0; / *** / -fx-padding: 1; / * 0.083333em; * /}

javascript - Convert an image to base64 without using HTML5 Canvas -

First, a small background: For the time being Further forgiveness is the long-winded nature of this introduction; However, it can help to provide an alternative solution which is not specific to the nature of the question. I have an ASP.NET MVC application that uses Embedded WinForm UserControls. These controls provide support for "narrow" on tablet PCs via the Microsoft .inux library. They are an unfortunate requirement due to an IE8 corporate standard; Otherwise, the HTML5 canvas solution will be there. However, an image URL InkPicture to & lt; PARAM & gt; Has been passed through . and object VIEWASEXT = "true" classid = "MyInkControl.dll # MyInkControl.MyInkControl" id = "myImage" name = "myImage" runat = "server" & gt; & Lt; PARAM name = "ImageUrl" value = "http: //some-website/Content/images/myImage.png" /> & Lt; / Object & gt; The associated property in t...

performance - Fastest way to generate and check numbers in PHP? -

I need some help in creating numbers in PHP, for example by checking that if the number is below 100 Then give 0.1 points. It is for a coin system that is called when some actions are used in flash games. I want to do it in the fastest time and this is the code that I am using before testing it. I update it on the main server for the game. & lt ;? Php $ coins = 0; $ Rand = rand (0, 1000); If ($ rand 100 & amp; amp; amp; $ Rand 500) {$ Coins = $ Coins + 0.5; } Echo "coins generated coins \ n"; ? & Gt; Sorry, if someone does not understand my search in some words, then I am asking how fast I can do it and someone has a suggestion for it. ? Instead of using rand () , consider using the . From Docs: Many random number generators of old labels have suspicious or unknown features and are slow. By default, the PHP rand () function uses libc random number generator with the function. The Mt_rand () function is a drop-in replacement for this. It uses...

- Where Developers Learn, Share, & Build Careers

Is there a way to connect to the SSE (ASE) database installation using SQL Server Management Studio 2008? I tried to use other tools to connect but they are very limited and want to use SSMS. You can use this tool: This is great.

ruby on rails - Choosing between two bolean methods when setting up a form -

I am scratching heads for hours now, how to try to figure out how to do it properly I have a form I am creating, and the user wants to choose between two options: "lemonade" or "pepsi" . Two booleans have been found in my database as "lemonade" and "pepsi" , and one The way to uncheck the second checkbox when one is first, or select only one of them in the drop down menu (where checked = true ). In other words, when is showing "P list" , then I should say Pepsi = true / lemon water = false or vice versa. I have tried to use assumptions, but it is not working any good idea? Hope the question was understandable. FYI: New for ROR I think you used to create boolean columns Time should use a default value, its original value will be lemonade or pepsi then in your opinion, you will display the checkbox with the value that is different default value , Example: If your default value is Lineded , you will be displ...

linux - How is locate command different from find command? -

I used both find and to find the command Is Can anyone explain how they work? What else happens? In the context of updatedb command command thanks in advance. find does not find it on the fly.

HTML5 Video - Load and unload video tag with jQuery -

I am developing a website with a large slider which uses 100% width and height slides. I am using some video as background in some video slides. When I tried several plugins, some were working with JScroll, so I ended up using the "plain video jquery plugin" (). The plugin uses video tags to play everything I am also adding a video tag inside each page, such as: & lt; Div class = "rsImg page" id = "page1" & gt; & Lt; Video poster = "video / poster page" id = "video-intro" & gt; & Lt; Source src = "video / trailer_480p.ogg" type = "video / og" & gt; & Lt; Source src = "video / video.mp34" type = "video / mp34" & gt; & Lt; / Video & gt; & Lt; / Div & gt; & Lt ;! - End of page 1 - & gt; The video plays and behaves correctly, it's good. But as I add more slides, I am concerned about memory usage and slow speed in the whole exper...

How to generate a multi-level navigation bar with the ExpressionEngine's Structure add-on? -

I am working with the latest versions of ExpressionEngine and Compositing add-ons. I'm looking for some help on creating 4 item nav bar, where two items are in a different structure level. My composition lines look like this: Services (Parents) ----- Translation ( Children) ----- Video (Children) Studio (Parents) About Us (Parent) And my main navigation bar should be: Translation - Video - Studio - About Us In As you can see that they are at different levels I also have the structure entries add-on. Shish'm working for hours, but I can not find a way to prepare the navigation. I would appreciate any help you might give me. The structure eventually stores its 'pages' as regular EE entries, so that you can hardcode the entry IDs in one channel: the entries to hold the titles: & Lt; Ul & gt; {Exp: Channels: Entries dynamic = "No" EntryID = "3 | 4 | 6 | 12" disabled = "Categories | endorsement | memb...

javascript - Custom Jquery Not Available At Runtime With Dynamicallly Added Html -

मेरे पास ऐसे पृष्ठ हैं जो इस तरह दिखते हैं .. & lt;! DOCTYPE html & gt; & LT; html & gt; & Lt; शीर्ष & gt; & Lt; title & gt; JQM & lt; / title & gt; & Lt; मेटा वर्णसेट = यूटीएफ -8 / & gt; & Lt; मेटा नाम = "व्यूपोर्ट" सामग्री = "चौड़ाई = डिवाइस-चौड़ाई, प्रारंभिक-पैमाने = 1" & gt; & Lt; link rel = "स्टाइलशीट" href = "http://code.jquery.com/mobile/latest/jquery.mobile.css" & gt; & Lt; script src = "http://code.jquery.com/jquery-1.8.1.min.js" & gt; & lt; / स्क्रिप्ट & gt; & Lt; script src = "http://code.jquery.com/mobile/latest/jquery.mobile.js" & gt; & lt; / स्क्रिप्ट & gt; & LT; स्क्रिप्ट & gt; $ ('(डेटा-भूमिका = "सूची-विभक्त"]')। टॉगल (फ़ंक्शन () {$ ('।' + $ (This) .attr ('डेटा-लिंक'))। AddClass ('शो'); $ (यह)। बच्चे ()। RemoveClass ('ui-icon-plus')। AddClass ('ui-i...

Formatting JSON in ASP.NET MVC -

I want to return a JSON with ASP.NET MVC action, the result type method that looks like this: true, user: [id: 1, filename: 'text22'}, {id: 2, filename: 'text 23'}]} How do I format it? Right now I have something like this returns Jason (new {with key. Success = "true", key.username = responseJsonString}, JsonRequestBehavior.AllowGet) EDIT: I am using VB.NET but the answer in C # is also fine. I prefer manually using ViewModels instead of creating complex JSON responses Ensures that the data come back, and the strongly typed properties are easy to work with IMHO. public class reaction {receives public success; Set; } Public IEnumerable & lt; Users & gt; User {Received; Set; }} Public class user {public id id (get; set;} public string name {get} set;}} and then just: Response Response = New Response (); Response. Returns to Success = True; // Jason (Response) to the rest of the data; Additionally, you use a base class for...

- Where Developers Learn, Share, & Build Careers

I have just typed a custom CharTokenizer , and I want to use it in my solar server . In Solr3, I can only increase the TokenizerFactory and return to my tax code forming the CharTokenizer , but TokenizerFactory So, I came to know that I should change the TokenizerFactory with the TokenFilterFactory , but in this situation, I did not return my custom CharTokenizer , because the parameters do not match. I also search for some documents, but it seems that nothing is really useful in it. So, how can I work it out? Example: The public class expands MyCustomTokenizer CharTokenizer {char anotherSpace = 24; Public MyCustomTokenizer (version matching edition, reader in) {super (in Milan version,); } Protected Boolean isTokenChar (come C) {return! Character.HisSpace (C) & amp; Amp; IsToken ((four)); } Private boolean isToken (char c) {if (c == Other Space || c == ',') {return false; } Back true; }} Public class MyCustomTokenizerFactory token filterfactor (pu...

- Where Developers Learn, Share, & Build Careers

On Play 1.0, when we change a variable type or for example @OneToMany change @ManyToMany to model play Make changes automatically, but with the 2.0 development script drop-down database. What is a way to apply the changes without leaving DB to Play 2.0? Yes, one way. You need to disable the automatic reconstruction of the file 1.sql and start writing your own evolutions with ALTERS instead of CREATES - them 2.SQL , 3.sql etc. In practice it means that, if you are working with a single database then you can also ... Manage the database tables and columns using your favorite DB GUI Evolutions Only when you are unable to use the GUI (host external connection is not allowed and do not have any GUI) or when you are planning to run multiple instances of the application on different databases, otherwise the GUI can be used. Yoga manually typing will be manually more complex. Tip: Sometimes, if I'm not sure if I have added all necessary relationships and barriers to m...

gridview - Add dynamic css class to every row/cell in CGridView -

I am a student and working on my practical project. This is a web application that tracks Google rankings for keywords and shows them as a table. Now I want a green color for every line, if the current ranking is better than the previous, red, then the ranking goes down. e.t.c. How can I apply it to CGI in Yii? Currently I have the following solution I have a function in the ControllerClass public function getCssClass ($ data) {$ cssClass; If ('($ data-> current_posy> $ data- & gt; prev_pos) || ($ data- & gt; current_poz === blank & amp; $ data-> gt; prev_pos! == tap ) ') {$ CssClass =' ​​rdown '; } Elseif ('$ data- & gt; current_page & lt; $ data- & gt; prev_pos') {$ cssClass = 'rup'; } And {$ cssClass = 'requal'; } Return $ cssClass; } And in the view I call this function on 'rowCssClassExpression': $ keywordDataProvider , 'RowCssClassExpression' = & gt; $ the- & gt; array (...