Search Results

Search found 808 results on 33 pages for 'bala 88'.

Page 11/33 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • Query in Datareader

    - by bala
    Hi All, In the below code, using (SqlDataReader dr = com.ExecuteReader(CommandBehavior.CloseConnection)) { while (dr.Read()) { _emailTemplate.EmailContent = dr["EMAILCONTENT"].ToString(); _emailTemplate.From = dr["EMAILFROM"].ToString(); _emailTemplate.Subject = dr["EMAILSUBJECT"].ToString(); } } I understand CommandBehavior.CloseConnection will close the connection object when datareader is closed. In the above code, when we use using with SqlDataReader, will it close the datareader before disposing it? in other other words, if i use using statement do i need to close the datareader manually?

    Read the article

  • best php config / ini class?

    - by Bala Clark
    Hi, I'm looking for an alternave to the parse_ini_file() function in php. I want a simple way to store config settings, but want the flexibility to store unlimited levels of multiple arrays, special characters, etc. Any ideas?

    Read the article

  • What HTTP error code should I use for unauthorised access to a protected image?

    - by Bala Clark
    I am writing a web application that has secure images uploaded by users. These images are only available to the owner when logged in. I am wondering what the best HTTP error code to throw in the case of unauthorised access? Would a 404 not found, or a 403 unauthorised be better? I am leaning towards the 403, but would it be better to hide the fact that the resource exists to unauthorised users be better?

    Read the article

  • DRBD not syncing between my nodes when IP is reset

    - by ramdaz
    I am trying to setup DRBD by following the article at http://www.howtoforge.com/setting-up-network-raid1-with-drbd-on-ubuntu-11.10-p2 I am using Ubuntu 10.04 DRBD - 8.3.11 In the first run I had everything working perfectly and when shifting the systems to a production environment I decided to restart the Meta Data creation part and start from scratch. The IPs had changed entirely in the production environment. Issuing drdbadm create-md r0 in both the servers runs successfully. But when I do "drbdadm -- --overwrite-data-of-peer primary all" on the primary it fails to start the re sync. My config file is as given below resource r0 { protocol C; syncer { rate 50M; } startup { wfc-timeout 15; degr-wfc-timeout 60; } net { cram-hmac-alg sha1; shared-secret "aklsadkjlhdbskjndsf8738734jkfkjfkjf"; } on primaryds { device /dev/drbd0; disk /dev/md2; address 172.16.7.1:7788; meta-disk internal; } on secondaryds { device /dev/drbd0; disk /dev/md2; address 172.16.7.3:7788; meta-disk internal; } } Status on primary root at primaryds:~# cat /proc/drbd version: 8.3.7 (api:88/proto:86-91) GIT-hash: ea9e28dbff98e331a62bcbcc63a6135808fe2917 build by root at primaryds, 2012-05-12 15:08:01 0: cs:WFBitMapS ro:Primary/Secondary ds:UpToDate/Inconsistent C r---- ns:0 nr:0 dw:0 dr:200 al:0 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 wo:b oos:5690352828 Status on secondary root at secondaryds:/etc/drbd.d# cat /proc/drbd version: 8.3.7 (api:88/proto:86-91) GIT-hash: ea9e28dbff98e331a62bcbcc63a6135808fe2917 build by root at secondaryds, 2012-05-12 15:25:25 0: cs:WFBitMapT ro:Secondary/Primary ds:Inconsistent/UpToDate C r---- ns:0 nr:0 dw:0 dr:0 al:0 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 wo:b oos:5690352828 Log of Primary May 30 13:42:23 primaryds kernel: [ 1584.057076] block drbd0: role( Secondary -> Primary ) disk( Inconsistent -> UpToDate ) May 30 13:42:23 primaryds kernel: [ 1584.086264] block drbd0: Forced to consider local data as UpToDate! May 30 13:42:23 primaryds kernel: [ 1584.086303] block drbd0: Creating new current UUID May 30 13:42:26 primaryds kernel: [ 1586.405551] block drbd0: drbd_sync_handshake: May 30 13:42:26 primaryds kernel: [ 1586.405564] block drbd0: self E8A075F378173D4B:0000000000000004:0000000000000000:0000000000000000 bits:1422588207 flags:0 May 30 13:42:26 primaryds kernel: [ 1586.405574] block drbd0: peer 0000000000000004:0000000000000000:0000000000000000:0000000000000000 bits:1422588207 flags:0 May 30 13:42:26 primaryds kernel: [ 1586.405582] block drbd0: uuid_compare()=2 by rule 30 May 30 13:42:26 primaryds kernel: [ 1586.405587] block drbd0: Becoming sync source due to disk states. May 30 13:42:26 primaryds kernel: [ 1586.405592] block drbd0: Writing the whole bitmap, full sync required after drbd_sync_handshake. May 30 13:42:27 primaryds kernel: [ 1588.171638] block drbd0: 5427 GB (1422588207 bits) marked out-of-sync by on disk bit-map. May 30 13:42:27 primaryds kernel: [ 1588.172769] block drbd0: conn( Connected -> WFBitMapS ) Log in Secondary May 30 13:42:24 secondaryds kernel: [ 1563.304894] block drbd0: peer( Secondary - Primary ) pdsk( Inconsistent - UpToDate ) May 30 13:42:24 secondaryds kernel: [ 1563.339674] block drbd0: drbd_sync_handshake: May 30 13:42:24 secondaryds kernel: [ 1563.339685] block drbd0: self 0000000000000004:0000000000000000:0000000000000000:0000000000000000 bits:1422588207 flags:0 May 30 13:42:24 secondaryds kernel: [ 1563.339695] block drbd0: peer E8A075F378173D4B:0000000000000004:0000000000000000:0000000000000000 bits:1422588207 flags:0 May 30 13:42:24 secondaryds kernel: [ 1563.339703] block drbd0: uuid_compare()=-2 by rule 20 May 30 13:42:24 secondaryds kernel: [ 1563.339709] block drbd0: Becoming sync target due to disk states. May 30 13:42:24 secondaryds kernel: [ 1563.339714] block drbd0: Writing the whole bitmap, full sync required after drbd_sync_handshake. May 30 13:42:26 secondaryds kernel: [ 1565.652342] block drbd0: 5427 GB (1422588207 bits) marked out-of-sync by on disk bit-map. May 30 13:42:26 secondaryds kernel: [ 1565.652965] block drbd0: conn( Connected - WFBitMapT ) The serves are not responding once it reaches this stage. Tried redoing it couple of time but noting happens. Why could the resync not be taking place? I would like some advice? Directions?

    Read the article

  • How can i call UItimer form one viewcontroller from unother viewcontroller?

    - by Bala
    At first time i call the timer like this in Third viewcontroller timer = [NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(targetMethod) userInfo:nil repeats:NO]; Then timer called the targetMethod -(void)targetMethod { First * sVC = [[First alloc] initWithNibName:@"First" bundle:[NSBundle mainBundle]]; [self presentModalViewController:sVC animated:YES]; [sVC release]; [timer invalidate]; } First viewcontroller opened.. In First viewcontroller had one button.In button action i wrote (IBAction) Action:(id)sender { [self dismissModalViewControllerAnimated:YES]; Third *BVC=[[Third alloc]init]; [Bvc TimerStart]; Timestart is function i start timer in this function.. i want to call Third viewcontroller timer function this place } timer started..But view didn't open (first )viewcontroller....... Please help me......

    Read the article

  • try-catch in JavaScript : how to get stack trace or line number of the original error

    - by Greg Bala
    When using TRY-CATCH in JavaScript, how to get the line number of the line that caused the error? On many browsers, the below code will work great and I will get the stack trace that points to the actual line that throw the exception. However, some browsers do not have "e.stack". Iphone's safari is one example. Is there someway to get the line number that will work for all browsers? try { // lots of code here var i = v.WillGenerateError; // how to get this line number in catch?? // lots of code here } catch (e) { alert (e.stack) // this will not work on iPhone, for example } Many thanks!

    Read the article

  • c# RichTextBox Tab size

    - by Bala R
    Hello, I'm using System.Windows.Forms.RichTextBox and by default the tab size is 8 spaces. The RichTextBox itself is not that big and 8 spaces leads to a lot of scrolling. Is there any way to make it 4 spaces. If it matters, the control is initially blank and the user starts entering stuff and the tabs have to shorter (4 spaces) as the user enters text with tabs. I tried http://stackoverflow.com/questions/154204/modifying-default-tab-size-in-richtextbox and a few variations of it but no luck.

    Read the article

  • Best way to identify and dispose locked thread in java.

    - by Bala R
    I have to call a function 3rd party module on a new thread. From what I've seen, the call either completes quickly if everything went well or it just hangs for ever locking up the thread. What's a good way to start the thread and make the call and wait for a few secs and if the thread is still alive, then assuming it's locked up, kill (or stop or abandon) the thread without using any deprecated methods. I have something like this for now, but I'm not sure if this is the best way to do it and I want to avoid calling Thread.stop() as it's deprecated. Thanks. private void foo() throws Exception { Runnable runnable = new Runnable() { @Override public void run() { // stuff that could potentially lock up the thread. } }; Thread thread; thread = new Thread(runnable); thread.start(); thread.join(3500); if (thread.isAlive()) { thread.stop(); throw new Exception(); } }

    Read the article

  • Convert any Form Video into RGB24 Media

    - by BALA
    how to convert YUY2,YUV, RGB565 and More Video subtype into RGB24 Subtype Video in DirectShow + VC++ can u understand my question? I have a Upstream filter its output is in YUY2 Format but i need to convert it into RGB24 Format. Is there any inbuilt Filters in DirectShow or we have to convert it through my code. i have already added ColorSpaceConverter But it is not Connecting with Smart Tee Input Pin.

    Read the article

  • Explanation needed for sum of prime below n numbers

    - by Bala Krishnan
    Today I solved a problem given in Project Euler its problem no 10 and it took 7 hrs for my python program to show the result. But in that forum itself a person named lassevk posted solution for this and it took only 4 sec. And its not possible for me to post this question in that forum because its not discussion forum. So, think about this if you want to mark this question as non-constructive. marked = [0] * 2000000 value = 3 s = 2 while value < 2000000: if marked[value] == 0: s += value i = value while i < 2000000: marked[i] = 1 i += value value += 2 print s If any one understand this code please explain it simple as possible. Link to the Problem 10 question.

    Read the article

  • how to read xml properties value?

    - by bala
    I have xml file in sdcard(xxx.file) how to read all the xml tag properties values starting point to end point and prints that value please help me I am not familiar in xml pullparser please help me... This is my xml file code: <?xml version="1.0"?> <layout schemaVersion="1" width="800" height="450" bgcolor="#000000"> <region id="47ff29524ce1b" width="800" height="450" top="0" left="0" userId="1"> <media id="9" type="image" duration="30" lkid="4" userId="1" schemaVersion="1"> <options><uri>9.png</uri></options> <raw/> </media></region></layout> java code: public class MainActivity extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); try{ XmlPullParserFactory factory = XmlPullParserFactory.newInstance(); factory.setNamespaceAware(true); XmlPullParser parser = factory.newPullParser(); File file = new File(Environment.getExternalStorageDirectory()+ "/xxx.xml"); FileInputStream fis = new FileInputStream(file); parser.setInput(new InputStreamReader(fis)); }catch(XmlPullParserException e){ e.printStackTrace(); }catch(FileNotFoundException e){ e.printStackTrace(); } } }

    Read the article

  • how to set footer image in this video screen?

    - by bala
    hi my problem is how to create footer image in this video screen while playing.... how to create this format. now i am give my description: • 1) Header image, a stretched background image. The location of this external image comes from the application xml; • 2) Footer image, a stretched background image. The location of this external image comes from the application xml; 2.a) the copyright, disclaimer and buy block, this block contains links to popup windows that contain a copyright and or disclaimer. And an option to buy the application for the advertisement less version. The content of this block is fed trough the application XML feed. The color of the text is fed by the application xml plus the popup links and texts itself; • 3) Carousel image, a stretched background image. The location of this external image comes from the application xml; 3.a) the carousel contains objects that can flow from right to left, possibly trough a animation (a soft break of the slide). The first object is centered in the middle of the carousel. This is the first element in the video feed. All the subsequent video object are added to the right of the centered object; 4) Total Video object, this object links to window two with the corresponding video of this object. This object is visually build out of the following sub parts:o 4.a) Thumb object (possible playing video thumb); 4.b) Reflection of the Thumb; 4.c) Textual Explanation of Thumb. 1) Video stream, this is the video stream coming from a external server streamed to the television (maybe up scaled) as 720p stream; 2) Advertisement, the type of advertisement shown overlaid on the video is based on previous settings in the video feed. This could mean that Admob, Adsense or a third party image plus URL could be shown. When the advertisement is selected trough navigation (it will highlight in a different color as a border around the advertisement. The color an thickness can be managed trough the application xml), when clicked a browser will open with the associated site (the application will be pushed to the background process, when the user is finished it will return to the app); 3) A back button, an image and navigational element. The location of the image comes from the application xml. The button is only shown when a cursor is moved (a button is pressed on the remote) it will highlight when selected and when pressed will forward the screen to the main window. When the main window is opened the video will be removed from cache and memory and cannot be start from the point it was exited. please give me your idea....

    Read the article

  • Conditional themes in Visual Studio 2008

    - by Bala R
    Can I have different visual studio themes associated to different solutions? Here's my problem. I have two files with sames names that have almost identical contents from two different solutions, open simultaneously. Of course, I have the first solution open and the file from the second solution is opened from explorer and has no connection to the first solution what so ever. Is there any way I can distinguish the the file that belongs to the solution from the other file, just by a different tab color or something like that and without hovering over the tab to look up the path. Thanks

    Read the article

  • Custom sort logic in OrderBy using LINQ

    - by Bala R
    What would be the right way to sort a list of strings where I want items starting with an underscore '_', to be at the bottom of the list, otherwise everything is alphabetical. Right now I'm doing something like this, autoList.OrderBy(a => a.StartsWith("_") ? "ZZZZZZ"+a : a ) EDIT: I ended up using something like this; optimization suggestions welcome! private class AutoCompleteComparer : IComparer<String> { public int Compare(string x, string y) { if (x.StartsWith("_") && y.StartsWith("_") || (!x.StartsWith("_") && !y.StartsWith("_"))) { return x.CompareTo(y); } else if (x.StartsWith("_")) { return 1; } else if (y.StartsWith("_")) { return -1; } return 0; } }

    Read the article

  • HTML5 offline cache google font api

    - by Bala Clark
    I'm trying to create an offline HTML5 test application, and am playing with the new google fonts api at the same time. Does anyone have any ideas how to cache the remote fonts? Simply putting the api call in the cache manifest doesn't work, I assume this is because the api actually loads other files (ttf, eot, etc). Any ideas if using the font api offline would be possible? For reference this is the call I am making: http://fonts.googleapis.com/css?family=IM+Fell+English|Molengo|Reenie+Beanie

    Read the article

  • problem in presentmodelviewcontroller?

    - by Bala
    i am using tabbarcontroller. In tabbar having one view.In that tab i call one function using Nstimer it open another viewcontroller. First * sVC = [[First alloc] initWithNibName:@"First" bundle:[NSBundle mainBundle]]; [self presentModalViewController:sVC animated:YES]; Opened viewcontrller having one button.when user click that button i want to close the view and call Nstimer. [self dismissModalViewControllerAnimated:NO] The problem is first the view opened and closed but second time view could not open.

    Read the article

  • How can i call NStimer form one viewcontroller from unother viewcontroller?

    - by Bala
    At first time i call the timer like this in Third viewcontroller timer = [NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(targetMethod) userInfo:nil repeats:NO]; Then timer called the targetMethod -(void)targetMethod { First * sVC = [[First alloc] initWithNibName:@"First" bundle:[NSBundle mainBundle]]; [self presentModalViewController:sVC animated:YES]; [sVC release]; [timer invalidate]; } First viewcontroller opened.. In First viewcontroller had one button.In button action i wrote (IBAction) Action:(id)sender { [self dismissModalViewControllerAnimated:YES]; Third *BVC=[[Third alloc]init]; [Bvc TimerStart]; Timestart is function i start timer in this function.. i want to call Third viewcontroller timer function this place } timer started..But view didn't open (first )viewcontroller....... Please help me......

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >