Search Results

Search found 376 results on 16 pages for 'baby diego'.

Page 7/16 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • UUID collision risk using different algorithms

    - by Diego Jancic
    Hi Guys, I have a database where 2 (or maybe 3 or 4) different applications are inserting information. The new information has IDs of the type GUID/UUID, but each application is using a different algorithm to generate the IDs. For example, one is using the NHibernate's "guid.comb", other is using the SQLServer's NEWID(), other might want to use .NET's Guid.NewGuid() implementation. Is there an above normal risk of ID collision or duplicates? Thanks!

    Read the article

  • Question about DispatcherUnhandledException

    - by Diego Pacheco
    The problem in this code is that when it's run and I push "Yes" button, This is shown: This means that my application stopped working, I just want it to end. private void App_DispatcherUnhandledException(object sender, DispatcherUnhandledExceptionEventArgs e) { string message = "An unhandled exception has ocurred, do you want close the app?"; MessageBoxResult currentMB = MessageBox.Show(message, "SomeTitleApp", MessageBoxButton.YesNo, MessageBoxImage.Exclamation); if (currentMB == MessageBoxResult.Yes) { Application.Current.Shutdown(); } else { e.Handled = true; } }

    Read the article

  • Apply dynamic list of templates to an argument

    - by Diego Martinez
    I need apply a variable sequence of templates to an argument. example 1: arg:tpl1():tpl2():...:tplN() Suppose that i have other multi valued argument, and each value is the name for a dynamic template invocation. ¿What is the better form of apply all the templates from the list to my argument? tplNames : {name | <(name)(arg)>} not works, just apply a template ever to the same innitial value of my argument, i need the same result of example 1 but in a dynamic way. Thank you!!

    Read the article

  • Suddenly Facebook API stopped working on Windows Phone

    - by Juan Diego
    My code hasn't changed, it was working yesterday or so. I can oauth, get the token but then doing the following: WebClient wc = new WebClient(); wc.DownloadStringCompleted += result; wc.DownloadStringAsync(new Uri("https://graph.facebook.com/me&access_token=xxxTOKENxxx", UriKind.Absolute)); Returns a NotFound WebClient exception: "The remote server returned an error: NotFound." Strange thing is that when pasting that same url on Chrome or IE it does work(PC). Tried on Emulator and on 2 different real WP devices, even pasting the same url on the WP browser. Feels like facebook is rejecting Windows Phone for some reason? Anyone has an idea of what might be happening?

    Read the article

  • Magento - Mage::getModel not working on remote server

    - by Diego
    I'm struggling with an issue for which I can't find an explanation. I have two development environments that I use for my projects. I created a simple module for Magento and I tested it on one environment. After overcoming all Magento's complications, the module works as expected. This is on XAMPP. I then copied the module to the development Linux environment, on a hosted server, and it crashes miserably. I did some debugging, and I found out that a call to Mage::getModel() returns bool(false) instead of the instance of the Model I requested. I double checked all files and directories, and they match. Database is not involved (not from my side, at least, I don't need tables) and both environments have only me as a User, with Admin permissions. Any suggestion on where should I start looking is welcome, thanks.

    Read the article

  • GridView to excel after create send mail c#

    - by Diego Bran
    I want to send a .xlsx , first I created (It has html code in it) then I used a SMTP server to send it , it does attach the file but when I tried to open it " It says that the file is corrupted etc" any help? Here is my code try { System.IO.StringWriter sw = new System.IO.StringWriter(); System.Web.UI.HtmlTextWriter htw = new System.Web.UI.HtmlTextWriter(sw); // Render grid view control. gvStock.RenderControl(htw); // Write the rendered content to a file. string renderedGridView = sw.ToString(); File.WriteAllText(@"C:\test\ExportedFile.xls", renderedGridView); // File.WriteAllText(@"C:\test\ExportedFile.xls", p1); } catch (Exception e) { Response.Write(e.Message); } try { MailMessage mail = new MailMessage(); SmtpClient SmtpServer = new SmtpClient("server"); mail.From = new MailAddress("[email protected]"); mail.To.Add("[email protected]"); mail.Subject = "Test Mail - 1"; mail.Body = "mail with attachment"; Attachment data = new Attachment("C:/test/ExportedFile.xls"); mail.Attachments.Add(data); SmtpServer.Port = 25; SmtpServer.Credentials = new System.Net.NetworkCredential("user", "pass"); // SmtpServer.EnableSsl = true; SmtpServer.UseDefaultCredentials = false; SmtpServer.Send(mail); } catch( Exception e) { Response.Write(e.Message); }

    Read the article

  • Python program to search for specific strings in hash values (coding help)

    - by Diego
    Trying to write a code that searches hash values for specific string's (input by user) and returns the hash if searchquery is present in that line. Doing this to kind of just learn python a bit more, but it could be a real world application used by an HR department to search a .csv resume database for specific words in each resume. I'd like this program to look through a .csv file that has three entries per line (id#;applicant name;resume text) I set it up so that it creates a hash, then created a string for the resume text hash entry, and am trying to use the .find() function to return the entire hash for each instance. What i'd like is if the word "gpa" is used as a search query and it is found in s['resumetext'] for three applicants(rows in .csv file), it prints the id, name, and resume for every row that has it.(All three applicants) As it is right now, my program prints the first row in the .csv file(print resume['id'], resume['name'], resume['resumetext']) no matter what the searchquery is, whether it's in the resumetext or not. lastly, are there better ways to doing this, by searching word documents, pdf's and .txt files in a folder for specific words using python (i've just started reading about the re module and am wondering if this may be the route, rather than putting everything in a .csv file.) def find_details(id2find): resumes_f=open("resume_data.csv") for each_line in resumes_f: s={} (s['id'], s['name'], s['resumetext']) = each_line.split(";") resumetext = str(s['resumetext']) if resumetext.find(id2find): return(s) else: print "No data matches your search query. Please try again" searchquery = raw_input("please enter your search term") resume = find_details(searchquery) if resume: print resume['id'], resume['name'], resume['resumetext']

    Read the article

  • [Android] Show default selection color for custom listview

    - by Diego
    Hello, I have a listview with a custom BaseAdapter. Each row of the listview has a TextView and a CheckBox. The problem is when I click (or touch) any row, the textview foreground becomes gray, instead of the default behavior (background - green, textview foreground - white). Here is the code: row.xml: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" style="@style/layout"> <TextView android:id="@+id/main_lv_item_textView" style="@style/textViewBig" android:layout_alignParentLeft="true"/> <CheckBox android:id="@+id/main_lv_item_checkBox" style="@style/checkBox" android:layout_width="wrap_content" android:layout_alignParentRight="true"/> </RelativeLayout> Custom Adapter: public class CustomAdapter extends BaseAdapter { private List<Profile> profiles; private LayoutInflater inflater; private TextView tvName; private CheckBox cbEnabled; public CustomAdapter(List<Profile> profiles) { this.profiles = profiles; inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); } public int getCount() { return profiles.size(); } public Object getItem(int position) { return profiles.get(position); } public long getItemId(int position) { return position; } public View getView(final int position, View convertView, ViewGroup parent) { View row = inflater.inflate(R.layout.main_lv_item, null); final Profile profile = profiles.get(position); tvName = (TextView) row.findViewById(R.id.main_lv_item_textView); registerForContextMenu(tvName); cbEnabled = (CheckBox) row.findViewById(R.id.main_lv_item_checkBox); tvName.setText(profile.getName()); if (profile.isEnabled()) { cbEnabled.setChecked(true); } tvName.setOnClickListener(new OnClickListener() { public void onClick(View v) { Bundle bundle = new Bundle(); bundle.putString(PROFILE_NAME_KEY, profile.getName()); Intent intent = new Intent(context, GuiProfile.class); intent.putExtras(bundle); startActivity(intent); } }); tvName.setOnLongClickListener(new OnLongClickListener() { public boolean onLongClick(View v) { selectedProfileName = ((TextView) v).getText().toString(); return false; } }); cbEnabled.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { if (!profile.isEnabled()) { for (Profile profile : profiles) { if (profile.isEnabled()) { profile.setEnabled(false); Database.getInstance().storeProfile(profile); } } } profile.setEnabled(isChecked); Database.getInstance().storeProfile(profile); updateListView(); } }); return row; } } Any help would be appreciated.

    Read the article

  • How a web app identify if a click came from another web app via code?

    - by Diego
    Hi, we have a web application that users can take online reports from ou ERP system data... And we have another web application that is used by our teachers and employees. We can't change the ERP web app because its a closed DLL, in this case we made some extended functionality in our custom internal web app and we are willing to put this functionality on the "menu" of the ERP web app. I need to integrate the two applications in the following way: When I click in the menu of the ERP web app, I want that our internal web app assert that the click have come from our ERP web app and not typed in the URL, this is possible?

    Read the article

  • How to avoid concurrent execution of a time-consuming task without blocking?

    - by Diego V
    I want to efficiently avoid concurrent execution of a time-consuming task in a heavily multi-threaded environment without making threads wait for a lock when another thread is already running the task. Instead, in that scenario, I want them to gracefully fail (i.e. skip its attempt to execute the task) as fast as possible. To illustrate the idea considerer this unsafe (has race condition!) code: private static boolean running = false; public void launchExpensiveTask() { if (running) return; // Do nothing running = true; try { runExpensiveTask(); } finally { running = false; } } I though about using a variation of Double-Checked Locking (consider that running is a primitive 32-bit field, hence atomic, it could work fine even for Java below 5 without the need of volatile). It could look like this: private static boolean running = false; public void launchExpensiveTask() { if (running) return; // Do nothing synchronized (ThisClass.class) { if (running) return; running = true; try { runExpensiveTask(); } finally { running = false; } } } Maybe I should also use a local copy of the field as well (not sure now, please tell me). But then I realized that anyway I will end with an inner synchronization block, that still could hold a thread with the right timing at monitor entrance until the original executor leaves the critical section (I know the odds usually are minimal but in this case we are thinking in several threads competing for this long-running resource). So, could you think in a better approach?

    Read the article

  • character_set_filesystem not present in show variables

    - by Diego
    I'm a little worried about the absence of this variable when I execute the show variables command. This is what I get when I execute show variables like 'char%': character_set_client utf8 character_set_connection utf8 character_set_database utf8 character_set_results utf8 character_set_server utf8 character_set_system utf8 character_sets_dir /usr/share/mysql/charsets/ I wonder why this is happening. What does it mean? can I just add it to the my.cnf file? Thank you... Edit: Sorry, I recently noted that I didn't specify which variable we're talking about (though I said it in the title). The variable is character_set_filesystem. Thanks.

    Read the article

  • Can somebody tell me why this Jquery tooltip is not showing up?

    - by alex
    <link rel="stylesheet" type="text/css" href="jquery-tooltip/jquery.tooltip.css"/> <script type="text/javascript" src="jquery-tooltip/jquery.tooltip.js"></script> <div id="baby" title="My tootip">The text</div> <script type="text/javascript"> $(function(){ $('#baby').tooltip({ track: true, delay: 0, showURL: false, showBody: " - ", extraClass: "pretty", fixPNG: true, opacity: 0.95, left: -120 }); }); </script> The files are found, and they are not 404.

    Read the article

  • include and Get not working on index

    - by diego
    I have a problem with my index.php, i have this small script that decides what content to deliver <?php $clase = $_GET['clase']; if ($clase == empresa) {include ("empresa.php");} elseif ($clase == productos) {include("productos.php");} else {include ($_SERVER['DOCUMENT_ROOT']."/inicio.html"); } ?> it works when i go to www.mysite.com/index.php but when i go to www.mysite.com it doesnt and i cant just figure our why.

    Read the article

  • Text limit on analytics event code

    - by Theo G
    I am just about to add the event code a button that downloads the pdf. Event code fields: _trackEvent(category, action, opt_label, opt_value, opt_noninteraction) Example of event code: onClick="_gaq.push(['_trackEvent', 'Videos', 'Play', 'Baby\'s First Birthday']);" I was just wondering if anyone knows if there is a text limit on the opt_value? Do you think the following would be too long 'Elmhurst School says IPC has made all the difference'?

    Read the article

  • Tips to Find the Best Keyword Research Software

    Keyword research plays a critical role in search engine optimization. The search engines use some keyword phrases to identify the web pages that are relevant to those words. For instance, if you are selling soft toys, then soft baby toys, buy soft toys, soft play toys are some of the right keywords that can bring good number of traffic to your site.

    Read the article

  • How to specify expiration of cacheable resources?

    - by Richard
    I'm trying to speed up a wordpress site -- this site: http://richardclunan.net I'm following the observations here: http://gtmetrix.com/reports/richardclunan.net/9ps7Zc0j The first item says: "The following cacheable resources have a short freshness lifetime. Specify an expiration at least one week in the future for the following resources:" How do I specify expirations for those things? (I'm not very technically-minded, and likely won't know relevant terminology -- really appreciate baby-steps explanation if possible :)

    Read the article

  • SQL SERVER – Puzzle – Statistics are not Updated but are Created Once

    - by pinaldave
    After having excellent response to my quiz – Why SELECT * throws an error but SELECT COUNT(*) does not?I have decided to ask another puzzling question to all of you. I am running this test on SQL Server 2008 R2. Here is the quick scenario about my setup. Create Table Insert 1000 Records Check the Statistics Now insert 10 times more 10,000 indexes Check the Statistics – it will be NOT updated Note: Auto Update Statistics and Auto Create Statistics for database is TRUE Expected Result – Statistics should be updated – SQL SERVER – When are Statistics Updated – What triggers Statistics to Update Now the question is why the statistics are not updated? The common answer is – we can update the statistics ourselves using UPDATE STATISTICS TableName WITH FULLSCAN, ALL However, the solution I am looking is where statistics should be updated automatically based on algorithm mentioned here. Now the solution is to ____________________. Vinod Kumar is not allowed to take participate over here as he is the one who has helped me to build this puzzle. I will publish the solution on next week. Please leave a comment and if your comment consist valid answer, I will publish with due credit. Here is the script to reproduce the scenario which I mentioned. -- Execution Plans Difference -- Create Sample Database CREATE DATABASE SampleDB GO USE SampleDB GO -- Create Table CREATE TABLE ExecTable (ID INT, FirstName VARCHAR(100), LastName VARCHAR(100), City VARCHAR(100)) GO -- Insert One Thousand Records -- INSERT 1 INSERT INTO ExecTable (ID,FirstName,LastName,City) SELECT TOP 1000 ROW_NUMBER() OVER (ORDER BY a.name) RowID, 'Bob', CASE WHEN  ROW_NUMBER() OVER (ORDER BY a.name)%2 = 1 THEN 'Smith' ELSE 'Brown' END, CASE WHEN ROW_NUMBER() OVER (ORDER BY a.name)%20 = 1 THEN 'New York' WHEN  ROW_NUMBER() OVER (ORDER BY a.name)%20 = 5 THEN 'San Marino' WHEN  ROW_NUMBER() OVER (ORDER BY a.name)%20 = 3 THEN 'Los Angeles' WHEN  ROW_NUMBER() OVER (ORDER BY a.name)%20 = 7 THEN 'La Cinega' WHEN  ROW_NUMBER() OVER (ORDER BY a.name)%20 = 13 THEN 'San Diego' WHEN  ROW_NUMBER() OVER (ORDER BY a.name)%20 = 17 THEN 'Las Vegas' ELSE 'Houston' END FROM sys.all_objects a CROSS JOIN sys.all_objects b GO -- Display statistics of the table - none listed sp_helpstats N'ExecTable', 'ALL' GO -- Select Statement SELECT FirstName, LastName, City FROM ExecTable WHERE City  = 'New York' GO -- Display statistics of the table sp_helpstats N'ExecTable', 'ALL' GO -- Replace your Statistics over here -- NOTE: Replace your _WA_Sys with stats from above query DBCC SHOW_STATISTICS('ExecTable', _WA_Sys_00000004_7D78A4E7); GO -------------------------------------------------------------- -- Round 2 -- Insert Ten Thousand Records -- INSERT 2 INSERT INTO ExecTable (ID,FirstName,LastName,City) SELECT TOP 10000 ROW_NUMBER() OVER (ORDER BY a.name) RowID, 'Bob', CASE WHEN  ROW_NUMBER() OVER (ORDER BY a.name)%2 = 1 THEN 'Smith' ELSE 'Brown' END, CASE WHEN ROW_NUMBER() OVER (ORDER BY a.name)%20 = 1 THEN 'New York' WHEN  ROW_NUMBER() OVER (ORDER BY a.name)%20 = 5 THEN 'San Marino' WHEN  ROW_NUMBER() OVER (ORDER BY a.name)%20 = 3 THEN 'Los Angeles' WHEN  ROW_NUMBER() OVER (ORDER BY a.name)%20 = 7 THEN 'La Cinega' WHEN  ROW_NUMBER() OVER (ORDER BY a.name)%20 = 13 THEN 'San Diego' WHEN  ROW_NUMBER() OVER (ORDER BY a.name)%20 = 17 THEN 'Las Vegas' ELSE 'Houston' END FROM sys.all_objects a CROSS JOIN sys.all_objects b GO -- Select Statement SELECT FirstName, LastName, City FROM ExecTable WHERE City  = 'New York' GO -- Display statistics of the table sp_helpstats N'ExecTable', 'ALL' GO -- Replace your Statistics over here -- NOTE: Replace your _WA_Sys with stats from above query DBCC SHOW_STATISTICS('ExecTable', _WA_Sys_00000004_7D78A4E7); GO -- You will notice that Statistics are still updated with 1000 rows -- Clean up Database DROP TABLE ExecTable GO USE MASTER GO ALTER DATABASE SampleDB SET SINGLE_USER WITH ROLLBACK IMMEDIATE; GO DROP DATABASE SampleDB GO Reference: Pinal Dave (http://blog.SQLAuthority.com) Filed under: PostADay, SQL, SQL Authority, SQL Index, SQL Performance, SQL Query, SQL Server, SQL Tips and Tricks, T SQL, Technology Tagged: SQL Statistics, Statistics

    Read the article

  • C++ match string in file and get line number

    - by Corey
    I have a file with the top 1000 baby names. I want to ask the user for a name...search the file...and tell the user what rank that name is for boy names and what rank for girl names. If it isn't in boy names or girl names, it tells the user it's not among the popular names for that gender. The file is laid out like this: Rank Boy-Names Girl-Names 1 Jacob Emily 2 Michael Emma . . . Desired output for input Michael would be: Michael is 2nd most popular among boy names. If Michael is not in girl names it should say: Michael is not among the most popular girl names Though if it was, it would say: Micheal is (rank) among girl names The code I have so far is below.. I can't seem to figure it out. Thanks for any help. #include <iostream> #include <fstream> #include <string> #include <cctype> using namespace std; void find_name(string name); int main(int argc, char **argv) { string name; cout << "Please enter a baby name to search for:\n"; cin >> name; /*while(!(cin>>name)) { cout << "Please enter a baby name to search for:\n"; cin >> name; }*/ find_name(name); cin.get(); cin.get(); return 0; } void find_name(string name) { ifstream input; int line = 0; string line1 = " "; int rank; string boy_name = ""; string girl_name = ""; input.open("/<path>/babynames2004.rtf"); if (!input) { cout << "Unable to open file\n"; exit(1); } while(input.good()) { while(getline(input,line1)) { input >> rank >> boy_name >> girl_name; if (boy_name == name) { cout << name << " is ranked " << rank << " among boy names\n"; } else { cout << name << " is not among the popular boy names\n"; } if (girl_name == name) { cout << name << " is ranked " << rank << " among girl names\n"; } else { cout << name << " is not among the popular girl names\n"; } } } input.close(); }

    Read the article

  • Does anyone know of a program that can search database objects (i.e. StoredProcedures) for keywords?

    - by hcabnettek
    Hi All, Is there such a tool that would look through a group of stored procedures for source code keywords? A client has a lot of business logic coded into their database and I need to find where it is using certain strings of text? I.E. what procedure contains 'was applied to their balance', so I can refactor that out into business logic. Does anyone know of such a tool? perhaps something from Red-Gate? Thanks, ~ck in San Diego

    Read the article

  • Earn $10 for each friend you refer to FREE Amazon Mom Account

    - by Gopinath
    If you are looking for options to earn some handful of referral bonuses then here is a great deal from Amazon. You can earn $10 for every friend/family member you refer to join free Amazon Mom trail account. What is Amazon Mom by the way? Amazon Mom is a free membership program created especially for parents and caretakers of small children. It gives free 2 days shipping of products purchased on Amazon.com, 20% discount on diapers, wipes and other baby stuff.  Though the name says Mom, it’s open to any one who has children. It does not matter whether you are father, grand parent, aunty or uncle. You can join the program and avail all the benefits of the program. It costs nothing to join FREE 3 months trail Amazon Mom costs $79/year, but anyone can join FREE 3 months trail and explore it with no cost. At the end of your 3 months trail you may either continue the program by paying the required amount or just opt out of it without any charges. You can learn more details about the Amazon Mom program benefits over here. To earn bonus you need to refer friends to join the free 3 months trail and as soon as they join Amazon will automatically credit $10 bonus to your Amazon.com account. Did you ever make money? Couple of weeks ago I saw this promotion and referred my friends. They loved the program as it gives a lot of discounts on baby diapers, wipes and they immediately joined. Within a 10 days they joined the program, Amazon sent emails to me confirming referral bonus. Here is a screen grab of one such referral email and my Amazon bonus are adding up every day as referrals pulling more people in to this program     How to refer friends and earn bonus? So you are ready to refer your friends and here are the steps to be followed Sign in to your Amazon.com account Go to Amazon Mom Referral page and copy the referral link displayed on screen Start sharing the link with your friends and request them to join the free trail If you own a blog or website, write about the program and let your readers know about it. You can also have a image banner on your website with referral link. Facebook and Twitter are the other two places where you can share the referral links and bring your friends on board. Know the rules and don’t gamble Amazon Mom referral program has few conditions that must be satisfied. Make sure that you read and understand all of them. Final and most important one is not to gamble Amazon! Yes, don’t play tricks like referring yourself or creating fake Amazon Mom accounts  in order to earn money. By gambling you may be able to cheat Amazon for a while, but as soon as Amazon detects the fraud  you will be booted out of their system.  Being on the good side always takes you in right direction and helps you earn money.

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >