Daily Archives

Articles indexed Tuesday October 16 2012

Page 10/15 | < Previous Page | 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • Using sizeof operator on a typedef-ed struct

    - by sskanitk
    This might be something too obvious. However, I couldn't find the specific answer though many stackoverflow threads talk about different aspects of this. typedef struct _tmp { unsigned int a; unsigned int b; } tmp; int main() { int c=10; if (c <= sizeof tmp) { printf("less\n"); } else { printf("more\n"); } return 0; } I compile this prog as - g++ -lstdc++ a.cpp I get an error - expected primary-expression before ‘)’ token I think I am missing something very obvious and straightforward. But can't seem to pinpoint it :-/ Thanks!

    Read the article

  • Java Method declaration

    - by user1701604
    I'm trying to declare a method for my program that takes only a 5 digit integer and for each digit of the integer, reads a value from the program and prints it out. I understand this isn't very clear but im having trouble relaying what I mean. I understand it will be some sort of for loop to read each digit of the integer individually until something reaches 5. Something like the charAt() string method but works for digits.

    Read the article

  • Poco C++ library on OSX 10.8.2: Undefined symbols for architecture x86_64

    - by Arman
    I'm trying to use Poco C++ library to do the simple http requests in C++ on Mac OS X 10.8.2. I installed Poco, copy-pasted the http_request.cc code from this tutorial, ran it with 'g++ -o http_get http_get.cc -lPocoNet', but got: Undefined symbols for architecture x86_64: "Poco::StreamCopier::copyStream(std::basic_istream<char, std::char_traits<char> >&, std::basic_ostream<char, std::char_traits<char> >&, unsigned long)", referenced from: _main in ccKuZb1g.o "Poco::URI::URI(char const*)", referenced from: _main in ccKuZb1g.o "Poco::URI::~URI()", referenced from: _main in ccKuZb1g.o "Poco::URI::getPathAndQuery() const", referenced from: _main in ccKuZb1g.o "Poco::URI::getPort() const", referenced from: _main in ccKuZb1g.o "Poco::Exception::displayText() const", referenced from: _main in ccKuZb1g.o "typeinfo for Poco::Exception", referenced from: GCC_except_table1 in ccKuZb1g.o ld: symbol(s) not found for architecture x86_64 collect2: ld returned 1 exit status Have been struggling with this for couple of hours. Any idea how to fix this? Thanks in advance!

    Read the article

  • Responsive grid, floated elements move underneath one another when min-width is reached

    - by Francesca
    I'm in the process of creating a responsive site (currently only working on the main content.) I've created two floated divs with percentage based widths. One contains an image which resizes with the browser resizing. The image has a min-width of 100px. Can anyone tell me why when put into a mobile sized width it doesn't drop down? How can I make the image stack underneath the text? JS Fiddle Live site

    Read the article

  • Calling Object Methods in Code

    - by Mister R2
    I'm a bit new to PHP, and I'm more experienced with strongly-typed languages such as JAVA, C# or C++.I'm currently writing a web tool in PHP, and I am having an issue trying to do what I want. The simple idea of what I want to do in code is run through some emails I used PHP-IMAP to get. I then create email objects (a class I defined), and put them in an array. Later on the code, however, I cycle through those emails to display them. However, as you might have guessed I'd have an issue with, I try to use an Email Class object method in that later loop -- and I'm pretty sure PHP doesn't know that the variables in the array happen to be Email Class objects! I wrote a toString method, and I want to call it in the loop. While I don't need to do this for the final version of this tool, I would like to find out what I'm missing. This is the class and the loop where I'm calling the method: include 'imap_email_interface.php'; class ImapEmail implements imap_email_interface { // Email data var $msgno; var $to; var $from; var $subject; var $body; var $attachment; // Email behavior /* PHP 4 ~ legacy constructor */ public function ImapEmail($message_number) { $this->__construct(); $this->msgno = $message_number; } /* PHP 5 Constructor */ public function __construct($message_number) { $this->msgno = $message_number; } public function send($send_to) { // Not Yet Needed! Seriously! } public function setHeaderDirectly($TO, $FROM, $SUBJECT) { $this->to = $TO; $this->from = $FROM; $this->subject = $SUBJECT; } public function setHeaderIndirectly($HEADER) { if (isset($HEADER->to[0]->personal)) $this->to = '"'.$HEADER->to[0]->personal.'", '.$HEADER->to[0]->mailbox.'@'.$HEADER->to[0]->host; else $this->to = $HEADER->to[0]->mailbox.'@'.$HEADER->to[0]->host; $this->from = '"'.$HEADER->from[0]->personal.'", '.$HEADER->from[0]->mailbox.'@'.$HEADER->from[0]->host; $this->subject = $HEADER->subject; } public function setBody($BODY) { $this->body = $BODY; } public function setAttachment($ATTCH) { $this->attachment = $ATTCH; } public function toString() { $str = '[TO]: ' . $this->to . '<br />' . '[FROM]: ' . $this->from . '<br />' . '[SUBJECT]: ' . $this->subject . '<br />'; $str .= '[Attachment]: '.$this->attachment.'<br />'; return $str; } } ?> The Loop: foreach ($orderFileEmails as $x) { $x->toString(); echo '<br /><br />'; } Any ideas?

    Read the article

  • Get the character count of a textarea including newlines

    - by styfle
    I tested this code in Chrome and there seems to be a bug involving the newlines. I am reaching the maxlength before I actually use all the characters. <textarea id="myText" maxlength="200" style="width:70%;height:200px"> Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s... Enter something: </textarea> <div> Char Count <span id="count"></span>/<span id="max"></span> </div>? <script> var ta = document.getElementById('myText'); document.getElementById('max').innerHTML = ta.maxLength; setInterval(function() { document.getElementById('count').innerHTML = ta.value.length; }, 250);? </script> How can I accurately get the char count of a textarea? jsFiddle demo: http://jsfiddle.net/Qw6vz/1/

    Read the article

  • Text Link is Hiding my Image Link

    - by icu222much
    I have a image where text/link is overlayed on top. My problem is that sometimes the text in the foreground will hide the link in the image in the background. I assume this is because the text box forms an invisible rectangle around the text, thus creating a region that appears it should belong to the image but is actually being covered by the text. I am wondering if it is possible that when I mouse over this region, I will be linking to my image link as oppose to my text link (see illustration). http://jsfiddle.net/WHpMr/

    Read the article

  • Query broke down and left me stranded in the woods

    - by user1290323
    I am trying to execute a query that deletes all files from the images table that do not exist in the filters tables. I am skipping 3,500 of the latest files in the database as to sort of "Trim" the table back to 3,500 + "X" amount of records in the filters table. The filters table holds markers for the file, as well as the file id used in the images table. The code will run on a cron job. My Code: $sql = mysql_query("SELECT * FROM `images` ORDER BY `id` DESC") or die(mysql_error()); while($row = mysql_fetch_array($sql)){ $id = $row['id']; $file = $row['url']; $getId = mysql_query("SELECT `id` FROM `filter` WHERE `img_id` = '".$id."'") or die(mysql_error()); if(mysql_num_rows($getId) == 0){ $IdQue[] = $id; $FileQue[] = $file; } } for($i=3500; $i<$x; $i++){ mysql_query("DELETE FROM `images` WHERE id='".$IdQue[$i]."' LIMIT 1") or die("line 18".mysql_error()); unlink($FileQue[$i]) or die("file Not deleted"); } echo ($i-3500)." files deleted."; Output: 0 files deleted. Database contents: images table: 10,000 rows filters table: 63 rows Amount of rows in filters table that contain an images table id: 63 Execution time of php script: 4 seconds +/- 0.5 second Relevant DB structure TABLE: images id url etc... TABLE: filter id img_id (CONTAINS ID FROM images table) etc...

    Read the article

  • how to pull href link

    - by user1751494
    I am trying to pull a link from a page that is in a formal I can't seem to find by simply googling... it might be simple but xpath is not my area of expertise I am using c# and trying to pull the link and just write it to the console to figure out how to get the link here is my C# code var document = webGet.Load("http://classifieds.castanet.net/cat/vehicles/cars/0_-_4_years_old/"); var browser = document.DocumentNode.SelectSingleNode("//a[starts-with(@href,'/details/')]"); if (browser != null) { string htmlbody = browser.OuterHtml; Console.WriteLine(htmlbody); } the html code section is <div class="last">&hellip;</div><a href="/cat/vehicles/cars/0_-_4_years_old/?p=13">13</a><a href="/cat/vehicles/cars/0_-_4_years_old/?p=2">&raquo;</a> <select name="sortby" class="sortby" onchange="doSort(this);"> <option value="">Most Recent</option> <option value="of" >Oldest First</option> <option value="mw" >Most Views</option> <option value="lw" >Fewest Views</option> <option value="lp" >Lowest Price</option> <option value="hp" >Highest Price</option> </select><div style="clear:both"></div> </div> <br /><br /><br /> <a href="/details/2008_vw_gti/1454282/" class="prod_container" > <h2>2008 VW GTi</h2> <div style="float:left; width:122px; z-index:1000"> <div class="thumb"><img src="http://c.castanet.net/img/28/thumbs/1454282-1-1.jpg" border="0"/></div> <div class="clear"></div> mls </div> <div class="descr"> The most fun car I have owned. Dolphin Grey, 4 door, Dual Climate control, DRG Transmission with paddle shift. Leather... </div> <div class="pdate"> <p class="price">$19,000.00</p> <p class="date">Kelowna<br />Posted: Oct 15, 2:54 PM<br />Views: 349</p> </div> <div style="clear:both" ></div> <div class="seal"><img src="/images/bookmark.png" /></div> </a> <a href="/details/price_drop_gorgeous_rare_white_2009_honda_accord_ex-l_coupe/1447341/" class="prod_container" > <h2>PRICE DROP!!! Gorgeous Rare White 2009 Honda Accord EX-L Coupe </h2> <div style="float:left; width:122px; z-index:1000"> <div class="thumb"><img src="http://c.castanet.net/img/28/thumbs/1447341-1-1.jpg" border="0"/></div> <div class="clear"></div> sun2010 </div> <div class="descr"> the link I'm trying to get is the "/details/2008_vw_gti/1454282/" part. THanks

    Read the article

  • Left Join only returning one row

    - by Adam
    I am trying to join two tables. I would like all the columns from the product_category table (there are a total of 6 now) and count the number of products, CatCount, that are in each category from the products_has_product_category table. My query result is 1 row with the first category and a total count of 68, when I am looking for 6 rows with each individual category's count. <?php $result = mysql_query(" SELECT a.*, COUNT(b.category_id) AS CatCount FROM `product_category` a LEFT JOIN `products_has_product_category` b ON a.product_category_id = b.category_id "); while($row = mysql_fetch_array($result)) { echo ' <li class="ui-shadow" data-count-theme="d"> <a href="' . $row['product_category_ref_page'] . '.php" data-icon="arrow-r" data-iconpos="right">' . $row['product_category_name'] . '</a><span class="ui-li-count">' . $row['CatCount'] . '</span></li>'; } ?> I have been working on this for a couple of hours and would really appreciate any help on what I am doing wrong.

    Read the article

  • D3.js binding an object to data and appending for each key

    - by frshca
    I'm a D3.js newbie and I'm learning how to play around with data. Let's say I have an object with names as keys, and each key has an array of numbers like this: var userdata = { 'John' : [0, 1, 3, 9, 8, 7], 'Harry': [0, 10, 7, 1, 1, 11], 'Steve': [3, 1, 4, 4, 4, 17], 'Adam' : [4, 77, 2, 13, 11, 13] }; For each user, I would like to append an SVG object and then plot the line with the array of values for that user. So here is my assumption of how that would look based on tutorials, but I know it is incorrect. This is to show my limited knowledge and give better understanding of what I'm doing: First I should create the line var line = d3.svg.line().interpolate('basis'); Then I want to bind the data to my body and append an svg element for each key: d3.select('body') .selectAll('svg') .data(userdata) .enter() .append('svg') .append(line) .x(function(d, i) { return i; }) .y(function(d) { return d[i]; }); So am I close??

    Read the article

  • Adding additional components to a web page after rendering by Wicket

    - by Andrew Fielden
    I have a requirement to create a web page using Wicket 1.5, which can present a variable number of panels to capture user input. All the panels have the same structure. The page would start off with one panel, and includes a button to dynamically add more as required. So the number of panels is unknown at the time the page is initially rendered. Effectively I'd be altering the structure of the page dynamically. This is possible in Javascript, using document.addElement() I've done a similar thing in the past by creating all the components on page load, and selectively showing/hiding components. The difference here is that the number of components (panels) is initially unknown. I'm unsure as to how this would be achieved with Wicket.

    Read the article

  • What should I name instances of a twisted.internet.defer.Deferred?

    - by slacy
    I'm writing code using Twisted, and having trouble coming up with a sensible variable name for my twisted internet deferred's. Here are my candidates: d : Too generic, too short, violates pylint rule C0103. def : Conflicts with function defintion builtin. defer : Conflicts with module twisted.internet.defer deferred : OK but pretty long cb : Still too short, violates pylint C0103, conflicts with many callback method names. cback : Too Weird? callback : Conflicts with method Deferred.callback() I'm looking for other suggestions. It seems like most of the Twisted example code uses "d" which is fine for simple invocations, but when you're passing Deferred's around to methods and storing them as member variables, it's really far too descriptive.

    Read the article

  • Load the <?php the_permalink(); ?> with an ajax loader

    - by fxg
    I´m working on a wordpress template. I´m trying to load the single.php of a post using ajax. I´m doing all the load thru a loader.js file that has this: // load single project page $("#project_slider").live("click", function(){ $("#content").hide(); $("#content").load("<?php the_permalink(); ?>", function(){ $(this).fadeIn("slow"); }); }); The problem is that I can´t just put on the .load because it doesn´t works. this is the markup: <div id="project_page" class="item"> <a href="#"> <img src="<?php the_field('artworks_thumbnail'); ?>" alt="" width="240" height="173"> </a> <div class="art_title"> <p>SWEET LIFE</p> </div> <div class="mask"></div> </div> How can I add the permalink via the loader.js?

    Read the article

  • Using charAt in java

    - by ThuL?nå F?rñ?nDö
    This is my assignment: Write a program where the user enters a string, and the program echoes it to the monitor with one character per line: C:\>java LinePerChar Enter a string: Octopus O c t o p u s I have tried, but I'm getting some compilation errors. Here's my code: import java.util.*; class CharactorEcho{ public static void main(String args []){ Scanner sc = new Scanner(System.in); System.out.println("Enter a string :"); try { String inputString = sc.nextLine(); for(int i=0; i < sc.length(); i++) { char c = inputString.charAt(i); System.out.println("" + c); } } catch(IOException e) { } } }

    Read the article

  • Shuffle Two NSMutableArray independently

    - by Superman
    I'm creating two NSMutableArray in my viewDidLoad, I add it in a NSMutableDictionary. When I tried shuffling it with one array, It is okay. But the problem is when Im shuffling two arrays independently its not working,somehow the indexes got mixed up. Here is my code for my array (I have two of these): self.items1 = [NSMutableArray new]; for(int i = 0; i <= 100; i++) { NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES); NSString *documentsDir = [paths objectAtIndex:0]; NSString *savedImagePath = [documentsDir stringByAppendingPathComponent:[NSString stringWithFormat:@"[Images%d.png", i]]; if([[NSFileManager defaultManager] fileExistsAtPath:savedImagePath]){ self.container = [[NSMutableDictionary alloc] init]; [container setObject:[UIImage imageWithContentsOfFile:savedImagePath] forKey:@"items1"]; [container setObject:[NSNumber numberWithInt:i] forKey:@"index1"]; [items1 addObject:container]; } } NSLog(@"Count : %d", [items1 count]); [items1 enumerateObjectsUsingBlock:^(id object, NSUInteger index, BOOL *stop) { NSLog(@"%@ images at index %d", object, index); }]; then my shuffle code(Which I tried duplicating for the other array,but not working also): srandom(time(NULL)); NSUInteger count = [items1 count]; for (NSUInteger i = 0; i < count; ++i) { int nElements = count - i; int n = (random() % nElements) + i; [items1 exchangeObjectAtIndex:i withObjectAtIndex:n]; } How am I going to shuffle it using above code (or if you have other suggestions) with two arrays? Thanks My other problem is when I tries subclassing the class for the shuffle method or either use the above code, their index mixed. For example: Object: apple, ball, carrots, dog Indexes: 1 2 3 4 but in my View when shuffled: Object: carrots, apple, dog, balle Indexes: 2 4 1 3

    Read the article

  • Wix Burn issue: Uninstall fails saying "Found dependent"

    - by vivek chaurasiya
    I have made a burn bundle which encapsulates 2 msi (msi1 , msi2) . In the UI I use checkboxes to ask the user to select which MSI to install. Now if user selects one of the msi to install, installation goes fine. But during Uninstall action, the burn log file says : [][:15]: Detected package: Netfx4Full, state: Present, cached: None [][:15]: Detected package: DummyInstallationPackageId3, state: **Absent**, cached: None [][:15]: Detected package: msi2.msi, state: **Present**, cached: Complete [][:15]: Detect complete, result: 0x0 [][:16]: Plan 3 packages, action: Uninstall [][:16]: Will not uninstall package: msi2.msi, found dependents: 1 [][:16]: Found dependent: {08e74372-83f2-4594-833b-e924b418b360}, name: My Test Application In the install scenario, I chose to install msi2 and NOT msi1. My bundle code looks like: <Bundle Name="My Test Application" Version="1.0.0.0" Manufacturer="Bryan" UpgradeCode="CC2A383C-751A-43B8-90BF-A250F7BC2863"> <Chain> <PackageGroupRef Id='Netfx4Full' /> <MsiPackage Id="DummyInstallationPackageId3" SourceFile="msi1.msi" ForcePerMachine="yes" InstallCondition="var1 = 1" > </MsiPackage> <MsiPackage SourceFile="msi2.msi" Vital="yes" Cache="yes" Visible="no" ForcePerMachine="yes" InstallCondition="var2 = 2" > </MsiPackage> </Chain> My OnDetectPackageComplete() looks like: private void OnDetectPackageComplete(object sender, DetectPackageCompleteEventArgs e) { if (e.PackageId == "DummyInstallationPackageId3" ) { if (e.State == PackageState.Absent) InstallEnabled = true; else if (e.State == PackageState.Present) UninstallEnabled = true; } } What should I do so that the burn bundle is freely able to uninstall the msi which the user selected at the time of install. Besides, If I select both msi to install, then uninstall is working fine. IMO, there is some problem b/w the relation of bundle and the 2 msi. Please help me as I am stuck with this problem.

    Read the article

  • Add Access-Control-Allow-Origin to header in PHP

    - by SANDeveloper
    I am trying to workaround CORS restriction on a WebGL application. I have a Web Service which resolves URL and returns images. Since this web service is not CORS enabled, I can't use the returned images as textures. I was planning to: Write a PHP script to handle image requests Image requests would be sent through the query string as a url parameter The PHP Script will: Call the web service with the query string url Fetch the image response (web service returns a content-type:image response) Add the CORS header (Add Access-Control-Allow-Origin) to the response Send the response to the browser I tried to implement this using a variety of techniques including CURL, HTTPResponse, plain var_dump etc. but got stuck at some point in each. So I have 2 questions: Is the approach good enough? Considering the approach is good enough: I made the most progress with CURL. I could get the image header and data with: $ch = curl_init(); $url = $_GET["url"]; curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HEADER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type:image/jpeg')); //Execute request $response = curl_exec($ch); //get the default response headers $headers = curl_getinfo($ch); //close connection curl_close($ch); But this doesn't actually change set the response content-type to image/jpeg. It dumps the header + response into a new response of content-type text/html and display the header and the image BLOB data in the browser. How do I get it to send the response in the format I want? Managed to get it working: $ch = curl_init(); $url = $_GET["url"]; curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HEADER, false); //Execute request $response = curl_exec($ch); //get the default response headers $headers = curl_getinfo($ch); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); header('Content-Type: image/jpeg'); header("Access-Control-Allow-Origin: *"); // header("Expires: Sat, 26 Jul 2017 05:00:00 GMT"); //close connection curl_close($ch); flush();

    Read the article

  • Is Safari on iOS 6 caching $.ajax results?

    - by user1684978
    Since the upgrade to iOS 6, we are seeing Safari's web view take the liberty of caching $.ajax calls. This is in the context of a PhoneGap application so it is using the Safari WebView. Our $.ajax calls are POST methods and we have cache set to false {cache:false}, but still this is happening. We tried manually adding a timestamp to the headers but it did not help. We did more research and found that Safari is only returning cached results for web services that have a function signature that is static and does not change from call to call. For instance, imagine a function called something like: getNewRecordID(intRecordType) This function receives the same input parameters over and over again, but the data it returns should be different every time. Must be in Apple's haste to make iOS 6 zip along impressively they got too happy with the cache settings. Has anyone else seen this behavior on iOS 6? If so, what exactly is causing it? The workaround that we found was to modify the function signature to be something like this: getNewRecordID(intRecordType, strTimestamp) and then always pass in a timestamp parameter as well, and just discard that value on the server side. This works around the issue. I hope this helps some other poor soul who spends 15 hours on this issue like I did!

    Read the article

  • traits in php – any real world examples/best practices?

    - by Max
    Traits have been one of the biggest additions for PHP 5.4. I know the synatax and understand the idea behind traits, like horizontal code re-usage for common stuff like logging, security, caching etc. However, I still dont know yet how I would make use of traits in my projects. Are there any open source projects that already use traits? Any good articles/reading material on how to structure architectures using traits?

    Read the article

  • No value given for one or more required parameters in connection initialisation

    - by Jean-François Côté
    I have an C# form application that use an access database. This application works perfectly in debug and release. It works on all version of Windows. But it crash on one computer with Windows 7. The message I got is: System.Data.OleDb.OleDbException: No value given for one or more required parameters. EDIT, after some debugging with messagebox on the computer that have the problem, here is the code that bug.The error is catched on the cmd.ExecuteReader(). The messagebox juste before is shown and the next one is the one in the catch with the exception below. Any ideas? public List<CoeffItem> GetModeleCoeff() { List<CoeffItem> list = new List<CoeffItem>(); try { OleDbDataReader dr; OleDbCommand cmd = new OleDbCommand("SELECT nIDModelAquacad, nIDModeleBorne, fCoefficient FROM tbl_ModelBorne ORDER BY nIDModelAquacad", m_conn); MessageBox.Show("Commande SQL créée avec succès"); dr = cmd.ExecuteReader(); MessageBox.Show("Exécution du reader sans problème!"); while (dr.Read()) { list.Add(new CoeffItem(Convert.ToInt32(dr["nIDModelAquacad"].ToString()), Convert.ToInt32(dr["nIDModeleBorne"].ToString()), Convert.ToDouble(dr["fCoefficient"].ToString()))); } MessageBox.Show("Lecture du reader"); dr.Close(); MessageBox.Show("Fermeture du reader"); } catch (OleDbException err) { MessageBox.Show("Erreur dans la lecture des modèles/coefficient: " + err.ToString()); } return list; } I think it's something related to the connection string but why only on that computer. Thanks for your help! EDIT Here is the complete error message: See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box. ***** Exception Text ******* System.Data.OleDb.OleDbException: No value given for one or more required parameters. at System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(OleDbHResult hr) at System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult) at System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult) at System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult) at System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method) at System.Data.OleDb.OleDbCommand.ExecuteReader(CommandBehavior behavior) at System.Data.OleDb.OleDbCommand.ExecuteReader() at DatabaseLayer.DatabaseFacade.GetModeleCoeff() at DatabaseLayer.DatabaseFacade.InitConnection(String strFile) at CalculatriceCHW.ListeMesure.OuvrirFichier(String strFichier) at CalculatriceCHW.ListeMesure.nouveauFichierMenu_Click(Object sender, EventArgs e) at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e) at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e) at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e) at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e) at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met) at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met) at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea) at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ScrollableControl.WndProc(Message& m) at System.Windows.Forms.ToolStrip.WndProc(Message& m) at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

    Read the article

  • Windows Azure Mobile Services: New support for iOS apps, Facebook/Twitter/Google identity, Emails, SMS, Blobs, Service Bus and more

    - by ScottGu
    A few weeks ago I blogged about Windows Azure Mobile Services - a new capability in Windows Azure that makes it incredibly easy to connect your client and mobile applications to a scalable cloud backend. Earlier today we delivered a number of great improvements to Windows Azure Mobile Services.  New features include: iOS support – enabling you to connect iPhone and iPad apps to Mobile Services Facebook, Twitter, and Google authentication support with Mobile Services Blob, Table, Queue, and Service Bus support from within your Mobile Service Sending emails from your Mobile Service (in partnership with SendGrid) Sending SMS messages from your Mobile Service (in partnership with Twilio) Ability to deploy mobile services in the West US region All of these improvements are now live in production and available to start using immediately. Below are more details on them: iOS Support This week we delivered initial support for connecting iOS based devices (including iPhones and iPads) to Windows Azure Mobile Services.  Like the rest of our Windows Azure SDK, we are delivering the native iOS libraries to enable this under an open source (Apache 2.0) license on GitHub.  We’re excited to get your feedback on this new library through our forum and GitHub issues list, and we welcome contributions to the SDK. To create a new iOS app or connect an existing iOS app to your Mobile Service, simply select the “iOS” tab within the Quick Start view of a Mobile Service within the Windows Azure Portal – and then follow either the “Create a new iOS app” or “Connect to an existing iOS app” link below it: Clicking either of these links will expand and display step-by-step instructions for how to build an iOS application that connects with your Mobile Service: Read this getting started tutorial to walkthrough how you can build (in less than 5 minutes) a simple iOS “Todo List” app that stores data in Windows Azure.  Then follow the below tutorials to explore how to use the iOS client libraries to store data and authenticate users. Get Started with data in Mobile Services for iOS Get Started with authentication in Mobile Services for iOS Facebook, Twitter, and Google Authentication Support Our initial preview of Mobile Services supported the ability to authenticate users of mobile apps using Microsoft Accounts (formerly called Windows Live ID accounts).  This week we are adding the ability to also authenticate users using Facebook, Twitter, and Google credentials.  These are now supported with both Windows 8 apps as well as iOS apps (and a single app can support multiple forms of identity simultaneously – so you can offer your users a choice of how to login). The below tutorials walkthrough how to register your Mobile Service with an identity provider: How to register your app with Microsoft Account How to register your app with Facebook How to register your app with Twitter How to register your app with Google The tutorials above walkthrough how to obtain a client ID and a secret key from the identity provider. You can then click on the “Identity” tab of your Mobile Service (within the Windows Azure Portal) and save these values to enable server-side authentication with your Mobile Service: You can then write code within your client or mobile app to authenticate your users to the Mobile Service.  For example, below is the code you would write to have them login to the Mobile Service using their Facebook credentials: Windows Store App (using C#): var user = await App.MobileService                     .LoginAsync(MobileServiceAuthenticationProvider.Facebook); iOS app (using Objective C): UINavigationController *controller = [self.todoService.client     loginViewControllerWithProvider:@"facebook"     completion:^(MSUser *user, NSError *error) {        //... }]; Learn more about authenticating Mobile Services using Microsoft Account, Facebook, Twitter, and Google from these tutorials: Get started with authentication in Mobile Services for Windows Store (C#) Get started with authentication in Mobile Services for Windows Store (JavaScript) Get started with authentication in Mobile Services for iOS Using Windows Azure Blob, Tables and ServiceBus with your Mobile Services Mobile Services provide a simple but powerful way to add server logic using server scripts. These scripts are associated with the individual CRUD operations on your mobile service’s tables. Server scripts are great for data validation, custom authorization logic (e.g. does this user participate in this game session), augmenting CRUD operations, sending push notifications, and other similar scenarios.   Server scripts are written in JavaScript and are executed in a secure server-side scripting environment built using Node.js.  You can edit these scripts and save them on the server directly within the Windows Azure Portal: In this week’s release we have added the ability to work with other Windows Azure services from your Mobile Service server scripts.  This is supported using the existing “azure” module within the Windows Azure SDK for Node.js.  For example, the below code could be used in a Mobile Service script to obtain a reference to a Windows Azure Table (after which you could query it or insert data into it):     var azure = require('azure');     var tableService = azure.createTableService("<< account name >>",                                                 "<< access key >>"); Follow the tutorials on the Windows Azure Node.js dev center to learn more about working with Blob, Tables, Queues and Service Bus using the azure module. Sending emails from your Mobile Service In this week’s release we have also added the ability to easily send emails from your Mobile Service, building on our partnership with SendGrid. Whether you want to add a welcome email upon successful user registration, or make your app alert you of certain usage activities, you can do this now by sending email from Mobile Services server scripts. To get started, sign up for SendGrid account at http://sendgrid.com . Windows Azure customers receive a special offer of 25,000 free emails per month from SendGrid. To sign-up for this offer, or get more information, please visit http://www.sendgrid.com/azure.html . One you signed up, you can add the following script to your Mobile Service server scripts to send email via SendGrid service:     var sendgrid = new SendGrid('<< account name >>', '<< password >>');       sendgrid.send({         to: '<< enter email address here >>',         from: '<< enter from address here >>',         subject: 'New to-do item',         text: 'A new to-do was added: ' + item.text     }, function (success, message) {         if (!success) {             console.error(message);         }     }); Follow the Send email from Mobile Services with SendGrid tutorial to learn more. Sending SMS messages from your Mobile Service SMS is a key communication medium for mobile apps - it comes in handy if you want your app to send users a confirmation code during registration, allow your users to invite their friends to install your app or reach out to mobile users without a smartphone. Using Mobile Service server scripts and Twilio’s REST API, you can now easily send SMS messages to your app.  To get started, sign up for Twilio account. Windows Azure customers receive 1000 free text messages when using Twilio and Windows Azure together. Once signed up, you can add the following to your Mobile Service server scripts to send SMS messages:     var httpRequest = require('request');     var account_sid = "<< account SID >>";     var auth_token = "<< auth token >>";       // Create the request body     var body = "From=" + from + "&To=" + to + "&Body=" + message;       // Make the HTTP request to Twilio     httpRequest.post({         url: "https://" + account_sid + ":" + auth_token +              "@api.twilio.com/2010-04-01/Accounts/" + account_sid + "/SMS/Messages.json",         headers: { 'content-type': 'application/x-www-form-urlencoded' },         body: body     }, function (err, resp, body) {         console.log(body);     }); I’m excited to be speaking at the TwilioCon conference this week, and will be showcasing some of the cool scenarios you can now enable with Twilio and Windows Azure Mobile Services. Mobile Services availability in West US region Our initial preview of Windows Azure Mobile Services was only supported in the US East region of Windows Azure.  As with every Windows Azure service, overtime we will extend Mobile Services to all Windows Azure regions. With this week’s preview update we’ve added support so that you can now create your Mobile Service in the West US region as well: Summary The above features are all now live in production and are available to use immediately.  If you don’t already have a Windows Azure account, you can sign-up for a free trial and start using Mobile Services today. Visit the Windows Azure Mobile Developer Center to learn more about how to build apps with Mobile Services. We’ll have even more new features and enhancements coming later this week – including .NET 4.5 support for Windows Azure Web Sites.  Keep an eye out on my blog for details as new features become available. Hope this helps, Scott P.S. In addition to blogging, I am also now using Twitter for quick updates and to share links. Follow me at: twitter.com/scottgu

    Read the article

  • Virtualized data centre&ndash;Part four: The design

    - by marc dekeyser
    Welcome back to the fourth post in this series! Today we will have a look at what Microsoft recommends as a “private cloud design” and what I will make of it. Whilst my own solution is based of the reference architecture, it is quite different indeed! An important thing to know is that, whilst I am using the private cloud as a reference, I am skipping most of the steps in designing a private cloud. If that is why you are here, please read the links at the end of the article and skim through my own content. A private cloud is much more process driven than just building a virtual infrastructure… The architecture of it all… So imagine for a minute that you have unlimited funds to build this lab of yours… You’d want redundancy on all levels and separation of each network where possible! Unfortunately we don’t have that luxury and, as you saw me hinting at in the previous article, our own design will be more limited but still quite capable! Networking From the networking perspective I will not have a fully redundant network, after all, this is but a lab environment! Thanks to Server 2012 I will be able to use bonding on my NIC’s and use LACP to improve the performance on that part. Storage As I mentioned in the previous article a Synology DS1218+ will be used for iSCSI provisioning. This device has 2 NICs on-board which can be bonded in to one 2 Gbps interface giving me a decent throughput and making the disks the most limiting factor in the storage design. Domain controllers and extra infrastructure Server 2012 completely supports running domain controllers virtualized and has no need to actually have a reachable DC when booting… That being said I need a remote access machine to power on the hosts (I have no need for them running 24/7) and a possible System Center VMM 2012 box (although server 2012 is not supported until SP1 :( ). Undecided on if I am to install those boxes separately or as a virtual machine… Which amounts to… Something like this pretty picture!                   Sources Microsoft Private Cloud Solutions Repository (en-US) http://social.technet.microsoft.com/wiki/contents/articles/12131.microsoft-private-cloud-solutions-repository-en-us.aspx Reference  Architecture: http://social.technet.microsoft.com/wiki/contents/articles/3819.reference-architecture-for-private-cloud.aspx Private Cloud Reference Model: http://social.technet.microsoft.com/wiki/contents/articles/4399.private-cloud-reference-model.aspx

    Read the article

  • Windows 8 Initial User Experience

    - by Kevin Shyr
    Today is the second day I'm using a Windows 8 laptop.  Load up time is fast, and changing applications is very smooth.  However, I keep finding myself hitting the windows key (double-clicking a PDF file, and, what?  How do I get back?)Other than that, the experience has been fine.  So far this has not been any worse than other windows upgrade experience I had so far.  No bad news is good news here.

    Read the article

  • Wow, no words enough for my disappointment

    - by Kevin Shyr
    Really cannot describe the disappointment felt at this moment.  A month ago there was rumor out there saying Surface tablet will be around $200.  Even though everybody agreed at the time that's not possible, or fair to Microsoft partners, the expectation was set.According to Paul Thurrott (http://www.winsupersite.com/article/windows8/microsoft-surface-pricing-availability-144526), the tablet starts at $499, but without the keyboard cover (Seriously, this is like offering Lincoln with manual shift).  The more disappointed fact is that there is no version that comes with cellular capability.  I was debating whether to get one, but now that decision is very easy.I'll wait.

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15  | Next Page >