Daily Archives

Articles indexed Tuesday May 11 2010

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

  • C# Multi-Comparisons possible?

    - by Iggy Ma
    is it possible in some way to compare multiple variables to one constant in a if statement? It would be very helpful if instead of if ( col.Name != "Organization" && col.Name != "Contacts" && col.Name != "Orders" ) { } I could just say if ( col.Name != "Organization" || "Contacts" || "Orders" ) { } And I know I could use a list but in some instances I dont want to... Thanks!

    Read the article

  • SCM?????????

    - by kiyoshi.nira
    ??? ????????????????????: · ??????? "Twitter" ????????2raKi44 ????? · ?????SCM, ????????????????? · ????????? · 3/31???????? · ????????????????????!? · ??????????????????? · ?????????IT????????????! · ????????????????????! · SCM???????? · ???????????????? · ??????????????????! (??) · ??????????????????! (??) · ?????????Oracle Applications Summit 2010? · ?3PL Study 2009? (5)????????????????? · 2010 Happy New Year! · ?3PL Study 2009? (4)???? - ??? · ??????? [????]????????????? · ?3PL Study 2009? (3)IT????????? · ?3PL Study 2009? (2)?????????? · ?3PL Study 2009? (1)????? · ??????10?26??????????????? · 3PL???????????????? (3) · 3PL???????????????? (2) · 3PL???????????????? (1) · SCM????????? · ???????????Oracle Direct??????????????! · ??????IFRS ??????????? ?? · ??????IFRS ??????????? ?? · ?????SCM??????????????? ?? · ?????SCM??????????????? ?? · SCM???????????? (???? 8???) · ???????????KPI???????? · ?????????????KPI ????? (??) · ?????????????KPI ????? (??) · ?????????????????????????! ?? MOC · ?????????????????????????! ?? · DMS ??·?????????? 6/24~6/26 · ??????????????????????????????? · ?????????????! · ????????????????????? · ??????????????????? - ?? On-Line OUTLET · ??????????????????? · Oracle OpenWorld Tokyo, 2009?4?22?~24? · ???????????????????????? · ???????????! · ???????????????! · ?????????????? · ????????????????????? · ?????????!

    Read the article

  • matlab's phi symbol

    - by ldigas
    Not that significant, but annoying to no end. Why does matlab has no small phi (\varphi) symbol ? It has pretty much all other symbols LaTeX offers, but not this one. Why ? I may be wrong of course, in which case would be delighted if someone could prove me wrong...

    Read the article

  • Using PHP and SQLite

    - by Barry Shittpeas
    I am going to use a small SQLite database to store some data that my application will use. I cant however get the syntax for inserting data into the DB using PHP to correctly work, below is the code that i am trying to run: <?php $day = $_POST["form_Day"]; $hour = $_POST["form_Hour"]; $minute = $_POST["form_Minute"]; $type = $_POST["form_Type"]; $lane = $_POST["form_Lane"]; try { $db = new PDO('sqlite:EVENTS.sqlite'); $db->exec("INSERT INTO events (Day, Hour, Minute, Type, Lane) VALUES ($day, $hour, $minute, $type, $lane);"); $db = NULL; } catch(PDOException $e) { print 'Exception : '.$e->getMessage(); } ?> I have successfully created a SQLite database file using some code that i wrote but i just cant seem to insert data into the database.

    Read the article

  • How do I POST/GET from rails to API with either ActiveResource or rest-client (preferred)?

    - by Angela
    Hi, this is a pretty basic question but I'm not entirely clear how to do this. I am trying to use a third-party service that has RESTful service. The service is called Postful. But I'm not clear what exactly to do? I've looked at ActiveResource (http://api.rubyonrails.org/classes/ActiveResource/Base.html) and rest-client, but I'm still not clear exactly what steps, code, and files to create. http://www.postful.com/service/mail is one of the services (details found http://www.postful.com/developer/guide#rest ), but to upload an image I have to post the following (but I'm not sure how I actually do this?). Thanks! > http://www.postful.com/service/upload > > Be sure to include the Content-Type > and Content-Length headers and the > image itself as the body of the > request. > > POST /upload HTTP/1.0 Content-Type: > application/octet-stream > Content-Length: 301456 > > ... file content here ... > > If the upload is successful, you will > receive a response like the following: > > <?xml version="1.0" encoding="UTF-8"?> > <upload> > <id>290797321.waltershandy.2</id> > </upload>

    Read the article

  • How to dynamic adjust the width of columns in Table layout

    - by michael
    Hi, I create a TableLayout which has 3 equally-wide columns (I put 'stretchColumns="*" in my TableLayout which has 3 TextViews). See below: But my questions is why I set one of the TextView to 'visibility' to Gone in my java code, the TableLayout does not re-size to 2 qually-wide columns which fit the whole screen. I have even call 'tableLayout.requestLayout()' after i set the visibility to Gone.' How can I achieve what I want? Thank you. <TableLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content" android:id="@+id/textpanel" android:stretchColumns="*"> <TableRow android:layout_width="fill_parent" android:layout_height="wrap_content"> <TextView android:id="@+id/text1" android:layout_width="fill_parent" android:layout_height="wrap_content"/> <TextView android:id="@+id/text2" android:layout_width="fill_parent" android:layout_height="wrap_content"/> <TextView android:id="@+id/text3" android:layout_width="fill_parent" android:layout_height="wrap_content"/> </TableRow> </TableLayout>

    Read the article

  • what's the way to determine if an Int a perfect square in Haskell?

    - by valya
    I need a simple function is_square :: Int -> Bool which determines if an Int N a perfect square (is there an integer x such that x*x = N). Of course I can just write something like is_square n = sq * sq == n where sq = floor $ sqrt $ (fromIntegral n::Double) but it looks terrible! Maybe there is a common simple way to implement such predicate?

    Read the article

  • How do you update a secondary view?

    - by Troy Sartain
    Perhaps there's a better way to set this up so I'm open to suggestions. But here's what I'm doing. I have a main UIView. On top of that I have a UIImageView and another UIView. When the UIImageView changes, I want to change the second UIView. So I have a class for it and the IB object's type is set to the class. In the .m of that class is a drawRect method that draws some rectangles. Also in the .m is a NSMutableArray property that is synthesized. I created an instance of that class in the controller of the main view. The problem: despite the fact that the drawRect works fine when the app starts (as traced in the debugger,) when the UIImageView changes I call a "setNeedsDisplay" on the instance variable of the second view after updating the @synthesize'd array but the drawRect does not get called. I think it has to do with instances. I wouldn't think threading would be an issue here. I just want to draw in a separate area of the screen based on an image also displayed.

    Read the article

  • Validating an Autocomplete field in Django

    - by anonymous coward
    I have models similar to the following: class Band(models.Model): name = models.CharField(unique=True) class Event(models.Model): name = models.CharField(max_length=50, unique=True) bands = models.ManyToManyField(Band) and essentially I want to use the validation capability offered by a ModelForm that already exists for Event, but I do not want to show the default Multi-Select list (for 'bands') on the page, because the potential length of the related models is extremely long. I have the following form defined: class AddEventForm(ModelForm): class Meta: model = Event fields = ('name', ) Which does what is expected for the Model, but of course, validation could care less about the 'bands' field. I've got it working enough to add bands correctly, but there's no correct validation, and it will simply drop bad band IDs. What should I do so that I can ensure that at least one (correct) band ID has been sent along with my form? For how I'm sending the band-IDs with auto-complete, see this related question: http://stackoverflow.com/questions/1528059/

    Read the article

  • How to Disable/Enable WYSIWYG editor in Magento 1.4

    - by latvian
    Hi When entering code in CMS static block(possible page as well) and in this code there is empty DIV tags such us: <a href="javascript:hide1(),show2(),hide3()"><div class="dropoff_button"></div></a> The DIV tags will be gone next time you open the block to edit. it will look as this <a href="javascript:hide1(),show2(),hide3()"> </a> without the div tags ...and saving again it modifies your code. I think it something to do with the 'show/hide editor'. By default it goes into the WYSIWYG editor, so when updating static block i don't see any other solution than 1."hide the editor' by clicking 'show/hide editor' 2.delete the old code from the editor 3. get code that doesn't miss the DIVs 4. Merge new code with code in 3 in some other editing software than magento 5. paste result in the magento editor, 6. Save Is this bug? What is your solution? Can i turn of WYSIWYG editor?

    Read the article

  • How many cron jobs are too many?

    - by guitar-
    I have a couple of cron jobs for basic maintenance which aren't very resource-intensive. I also have custom task scheduling (which is just calling a .php file and passing information via GET, ie: cronjob.php?param1=param ...). These can add up pretty quickly. These just call system commands and run external programs (Nmap is one of them). They usually don't take long either. Anyway, can anyone tell me, roughly what point is too many? I know it's hard to say since it depends on what job is being run and how often, but at what point does the crontab program start "struggling"? Anyone have any idea? Thanks.

    Read the article

  • WordPress: Display Online Users' Avatars

    - by Wade D Ouellet
    Hi, I'm using version 2.7.0 of this WordPress plugin to display which users are currently online (the latest version doesn't work): http://wordpress.org/extend/plugins/wp-useronline/ It's working great but I would love to be able to alter it quickly to display the users' avatars instead of their names. Hoping someone with pretty good knowledge of WordPress queries and functions can help. The part below seems to be the part that handles all this. If this isn't enough, here is the link to download the version I am using with the full php files: http://downloads.wordpress.org/plugin/wp-useronline.2.70.zip // If No Bot Is Found, Then We Check Members And Guests if ( !$bot_found ) { if ( $current_user->ID ) { // Check For Member $user_id = $current_user->ID; $user_name = $current_user->display_name; $user_type = 'member'; $where = $wpdb->prepare("WHERE user_id = %d", $user_id); } elseif ( !empty($_COOKIE['comment_author_'.COOKIEHASH]) ) { // Check For Comment Author (Guest) $user_id = 0; $user_name = trim(strip_tags($_COOKIE['comment_author_'.COOKIEHASH])); $user_type = 'guest'; } else { // Check For Guest $user_id = 0; $user_name = __('Guest', 'wp-useronline'); $user_type = 'guest'; } } // Check For Page Title if ( is_admin() && function_exists('get_admin_page_title') ) { $page_title = ' &raquo; ' . __('Admin', 'wp-useronline') . ' &raquo; ' . get_admin_page_title(); } else { $page_title = wp_title('&raquo;', false); if ( empty($page_title) ) $page_title = ' &raquo; ' . strip_tags($_SERVER['REQUEST_URI']); elseif ( is_singular() ) $page_title = ' &raquo; ' . __('Archive', 'wp-useronline') . ' ' . $page_title; } $page_title = get_bloginfo('name') . $page_title; // Delete Users $delete_users = $wpdb->query($wpdb->prepare(" DELETE FROM $wpdb->useronline $where OR timestamp < CURRENT_TIMESTAMP - %d ", self::$options->timeout)); // Insert Users $data = compact('user_type', 'user_id', 'user_name', 'user_ip', 'user_agent', 'page_title', 'page_url', 'referral'); $data = stripslashes_deep($data); $insert_user = $wpdb->insert($wpdb->useronline, $data); // Count Users Online self::$useronline = intval($wpdb->get_var("SELECT COUNT(*) FROM $wpdb->useronline"));

    Read the article

  • dojo.connect with dynamic content

    - by peirix
    Is there something similar to jQuery's live()-method in dojo? I have some content that's being loaded with ajax, and need that content to get the same event connections. dojo.query(".allTheseElements").connect("onclick", function() { /***/ } And then have the dynamically loaded content fire on this too.

    Read the article

  • Preoder traversal of a Btree

    - by Phenom
    I'm trying to figure out how to do a preorder traversal of a Btree. I know that generally preorder traversal works like this: preorder(node) { print value in node preorder(left child) preorder(right child) } What's confusing to me is how to make this work with a Btree, since in each node there are multiple values and multiple child pointers. When printing values, do all the values in the node get printed before descending into the left child? Each node looks like this: child1 value1 child2 value2 child3 value3 child4 Also, why would anyone want to do a preorder traversal of a Btree, since an inorder traversal is what will display the values in ascending order?

    Read the article

  • PayPal Cannot send value to paypal

    - by preetu
    Hi.. I have created PayPal handler class now i can receive properly all IPN messages and all transaction successful.Now i need to keep track of my users which user send request then i need to update his database .I tried to send my application primary key to PayPal to get to know which user doing transaction then i tried to retrieve in IPN message but i cant retrieve what i sent my own value some value. Is it possible to send own value to PayPal or how should i update my DB...Thank you Adv.

    Read the article

  • How to assign Value to Key in App.config of C# win app ?

    - by karthik
    I am using the below string in my code : string AAR_FilePath = "\"C:\\MySQL\\MySQL Server 5.0\\bin\\mysqldump\""; which i dont want to hardcore in my code. So i need to use that in my app.config I tried to give the same value as, <add key="Path_SqlDump" value="\"C:\\MySQL\\MySQL Server 5.0\\bin\\mysqldump\""></add> But the above gives me error, because of the quotes. All i need is, i should be able to assign "\"C:\MySQL\MySQL Server 5.0\bin\mysqldump\"" to a string. HOW ?

    Read the article

  • Two parallel line segments intersection

    - by Judarkness
    I know there are many algorithms to verify whether two line segments are intersected. But once they encountered parallel condition, they just tell the user a big "No" and pretend there is no overlap, share end point, or end point collusion. I know I can can calculate the distance between 2 lines segments. If the distance is 0, check the end points located in the other line segments or not. And this means I have to use a lot of if else and && || conditions. This is not difficult, but my question is "Is there a trick( or mathematics) method to calculate this special parallel case?"

    Read the article

  • Connecting to SQL Server with Visual Studio Express Editions

    - by tlianza
    I find it odd that in Visual C# 2008 Express edition, when you use the database explorer, your options are: 1) Microsoft Access 2) SQL Server Compact 3.5, and 3) SQL Server Database File. BUT if you use Visual Web Developer 2008 Express, you can connect to a regular SQL Server, Oracle, ODBC, etc. For people developing command-line or other C# apps that need to talk to a SQL Server database, do you really need to build your LINQ/Data Access code with one IDE (Visual Web Developer) and your program in another (Visual C#)? It's not a hard workaround, but it seems weird. If Microsoft wanted to force you to upgrade to Visual Studio to connect to SQL Server, why would they include that feature in one of their free IDEs but not the other? I feel like I might be missing something (like how to do it all in Visual C#). Thanks! Tom

    Read the article

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