Search Results

Search found 842 results on 34 pages for 'dummy derp'.

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

  • Faking a dynamic schema in Core Data?

    - by Gouldsc
    From reading the Apple Docs on Core Data, I've learned that you should not use Core Data when you need a dynamic schema. If I wanted to provide the user the ability to create their own properties, in a core data model would it work if I created some "dummy" attributes like "custom decimal 1", "custom decimal 2", "custom text 1", "custom text 2" etc that the user could name and use for their own purposes? Obviously this won't work for relationships, but for simple properties it seems like a reasonable workaround. Will creating a bunch of dummy attributes on my entities that go unused by most users noticeably decrease performance for them? Have any of you tried something like this? Thanks!

    Read the article

  • SELECT SUM returns a row when there are no records

    - by Jose L Martinez-Avial
    Hi, I'm finding some problems with a query that returns the sum of a field from a table for all the records that meet certain conditions. I expected to receive a "No records found' when there were no records, but instead I'm receiving a null result. SQL> SELECT * FROM DUAL WHERE 1=2; no rows selected SQL> SELECT SUM(dummy) FROM DUAL WHERE 1=2; SUM(DUMMY) ---------- SQL> Is there any way to not receive any record in that case?

    Read the article

  • VirtualTreeView add roots with Threads

    - by Benjamin Weiss
    I would like to add roots to a VirtualTreeView http://www.delphi-gems.com/index.php/controls/virtual-treeview with a thread like this: function AddRoot ( p : TForm1 ) : Integer; stdcall; begin p.VirtualStringTree1.AddChild(NIL); end; var Dummy : DWORD; i : Integer; begin for i := 0 to 2000 do begin CloseHandle(CreateThread(NIL,0, @ADDROOT, Self,0, Dummy)); end; end; The reason for this is that I want to add all connections from my INDY Server to the TreeView. Indy's onexecute/onconnect get's called as a thread. So if 3+ connections come in at the same time the app crashes due to the TreeView. Same is if a client gets disconnected and I want to delete the Node. I am using Delphi7 and Indy9 Any Idea how to fix that?

    Read the article

  • Anything wrong with this php code?

    - by Hwang
    1st I have to say I know nothing bout php. I was actually doing my AS3 guest-book and through parts of tutorials from Activetut, I managed to come out a flash guest-book. So the problem now I'm facing is the guest-book could only inject 1 XML data and it will always clear off the old 1, while the flash is still caching on the old XML files. I'd found some other tutorials(which I think its quite hard since i dunno anything about php) and comparing to the php code I'm using, it seems to be extremely short. I have no idea what the code does, so currently I'm not sure whether the problems came from the php or my AS3. <?php if (isset($GLOBALS["HTTP_RAW_POST_DATA"])){ $xml = $GLOBALS["HTTP_RAW_POST_DATA"]; $file = fopen("wish.xml","wb"); fwrite($file, $xml); fclose($file); } ?> and below is my correct XML format: <WISHES> <WISH> <NAME>Test</NAME> <EMAIL>[email protected]</EMAIL> <DATENTIME>2/3/10</DATENTIME> <MESSAGE>Dummy Message</MESSAGE> </WISH> <WISH> <NAME>Test</NAME> <EMAIL>[email protected]</EMAIL> <DATENTIME>2/3/10</DATENTIME> <MESSAGE>Dummy Message</MESSAGE> </WISH> </WISHES> So anyone kind to explain what that php code does? cause it replace my XML with: <WISH> <NAME>Test</NAME> <EMAIL>[email protected]</EMAIL> <DATENTIME>2/3/10</DATENTIME> <MESSAGE>Dummy Message</MESSAGE> </WISH>

    Read the article

  • SSAS 2008/Excel 2007 - Can't see cube

    - by Brian
    I have created a cube in SSAS 2008. In BIDS and SSMS I can see it fine. However, I cannot connect through Excel. I have tried both Excel 2003 and Excel 2007. I must support both and neither work. I can see the database but the cubes do not show up. I created a dummy cube in the project using the wizard and deployed that to the same database. In Excel 2003, I can see and connect to the dummy cube. Excel 2007 can't even find the server/instance after adding this cube. I have used another computer and received the same results with Excel 2003. Does anyone have any suggestions? Thanks for any help you can give me. -Brian

    Read the article

  • Computed properties in NHibernate

    - by Liron Levi
    I'm having a problem in mapping an existing data class member to the database.. I have a database table where one of the columns is a string type, but actually stores a comma separated list of numbers. My data class shows this field as a list of integers. The problem is that I couldn't find any hook in NHibernate that allows me to invoke the custom code that is required to replace the string field by the list and vice versa. To illustrate (simplified of course): The database table: CREATE TABLE dummy ( id serial, numlist text -- (can store values such as '1,2,3') ) The data class: class Dummy { public int Id; public List<int> NumbersList; } Can anyone help?

    Read the article

  • Placing a window near the system tray

    - by user227990
    I am writing a program that needs to set a window just above/below the traybar for gtk. I have tried using the 2 approaches that failed. One was using the gtk_status_icon_position_menu function and placing the window in the point where the user clicks (in the tray bar). The problem is that these solutions work in gnome(Linux) but not in Windows. In Linux they work because the window manager doesn't seem to allow placement of windows in the tray panel, honoring the closest possible. In Windows this doesn't happen and the window can go "out" of the screen which understandably is not desired. With this said i went out for a work around. My idea was to set the window in the location of mouse click and get the x and y coordinates of a normal window placement and with it's size check if it would be within the screen boundaries. If it was not make the correction. I have came up with the functions needed but for some reason the gdk_drawable_get_size(window-window ,&WindowWidth, &WindowHeight) and other similar functions only give the correct size value after the second run of the signal function. The result of the first run is just 1 to both size and width. (I have read the issue of X11 not giving correct results, but i think this is not it) event_button = (GdkEventButton *) event; if (event_button->button == 1) { if (active == 0) { gboolean dummy; gint WindowHeight, WindowWidth, WindowPosition[2]; GdkScreen *screen; gint ScreenHeight, ScreenWidth; dummy = FALSE; gtk_widget_show_all(window); gtk_window_present(GTK_WINDOW(window)); gtk_status_icon_position_menu(menu, &pos[X], &pos[Y], &dummy, statusicon); gtk_window_move(GTK_WINDOW(window), pos[X],pos[Y]); gdk_drawable_get_size(window->window ,&WindowWidth, &WindowHeight); screen = gtk_status_icon_get_screen(statusicon); ScreenWidth = gdk_screen_get_width(screen); ScreenHeight = gdk_screen_get_height(screen); g_print("Screen: %d, %d\nGeometry: %d, %d\n",ScreenWidth, ScreenHeight, WindowWidth, window->allocation.height); gtk_entry_set_text(GTK_ENTRY(entry),""); active = 1; return TRUE; } How can i do what i want in a portable way?

    Read the article

  • Looking for an elegant way to store one-to-many relationship in coredata when order is important

    - by Eric Schweichler
    I've been trying to come up with a way to solve my problem, but every solution I can think of is messy and makes me want to retch. I have a one-to-many relationship, consisting of a Team object that can have many Member objects. When I built my data model using Xcode, I was given the default NSSet in which to store the member objects, Unfortunately Sets are not ordered and I need to preserve the order of the Member objects and I need to know if there are empty spaces between Members. I thought of Using an NSArray in place of the NSSet and creating a dummy Member object in my data store that I could use to mark vacant a spot between to Member objects, but that solution really feels like too much of a hack to me. Since I'll always have to filter out this dummy Member from any queries. An NSDictionary would be perfect as I could store the Member object references and their positions as Object-Key pairs, (taking care of both order and vacancies) but apparently CoreData does not support NSDictionary. Has anyone had a similar need, and devised a simple solution?

    Read the article

  • JS Url GET vars - problem with encoding

    - by Martin
    Hey there! I'm having a bit of trouble here and I was hoping someone throws me a hint :) I'm getting some GET VARS with JS but I have trouble with non-latin charsets: cyrillic for example. The cyrillic var appears correct in the url but when I retrieve it with JS I get some dummy string. I was wondering of a function similar to "unescape" for such a case. Alternatively, if someone knows a way I could convert a cyrillic string to the same dummy string I get from the URL, it will still do me the trick, since all I need is compare. :) Thanks! Martin

    Read the article

  • Encoding non-English characters

    - by Martin
    Hey there! I'm having a bit of trouble here and I was hoping someone throws me a hint :) I'm getting some GET VARS with JS but I have trouble with non-latin charsets: cyrillic for example. The cyrillic var appears correct in the url but when I retrieve it with JS I get some dummy string. I was wondering of a function similar to "unescape" for such a case. Alternatively, if someone knows a way I could convert a cyrillic string to the same dummy string I get from the URL, it will still do me the trick, since all I need is compare. :) Thanks! Martin

    Read the article

  • How to Ignore certain tags and replace texts in PHP

    - by Aakash Chakravarthy
    Hello, I have a variable like $content = "Lorem Ipsum is simply <b>dummy text of the printing</b> and typesetting industry. Lorem Ipsum has been the industry's <i>standard dummy text</i> ever since the 1500s <string>javascriptFunc();</script>" ; when i use str_replace('a', '', $content); all the 'a's get removed. But the 'a's within the <script> tag should not be removed. or is there any way to replace text other than this method Please help .

    Read the article

  • Strange/simple batch question regarding Java/Ant

    - by Monster
    For my company, I'm making a batch script to go through and compile the latest revisions of code for our current project. I'm using Ant to build the class files, but encountered a strange error. One of the source files imports .* from a directory, where there are no files (only folders), and in fact, the folders needed are imported right after. It compiles perfectly fine in Eclipse, but I'm using an Ant script to automate it outside of the IDE, and Javac throws an error when it encounters this line. Is there any automated procedure I can use to ignore/suppress this error with javac in Ant? I'd even go so far as to create a dummy file in the importing directory, but all of that in contained in a Jar file I don't wish to have to decompress and then recompress with the dummy file. Thanks!

    Read the article

  • How to force a node inside tiny mce ?

    - by KutePHP
    Hi All, I'm using tiny mce for my project and want to validate the node inside the tiny mce. On click of a text element, let's say a paragraph with some id, I load editor for the element. But, sometimes if user replaces the whole content, the node and its HTML is lost. I want to retain this node and only the content is removed. The node can be a paragraph or heading or ul or ol. EDIT : I'm providing dummy text such as "Lorem epsum .....". User will be removing this dummy text and add his content. How can I accomplish this ?

    Read the article

  • Insert A Line At The Beginning Of A File

    - by thebourneid
    I'm trying to insert/add a line 'COMMENT DUMMY' at the beginnig of a file as a first row if /PATTERN/ not found. I know how to do this with OPEN CLOSE function. Probably after reading the file it should look something like this: open F, ">", $fn or die "could not open file: $!"; ; print F "COMMENT DUMMY\n", @array; close F; But I have a need to implement this with the use of the Tie::File function and don't know how. use strict; use warnings; use Tie::File; my $fn = 'test.txt'; tie my @lines, 'Tie::File', $fn or die "could not tie file: $!"; untie @lines;

    Read the article

  • Change the size of the panel dynamically

    - by C. Karunarathne
    Hi! I am implementing an application that needs to drag and drop image boxes in a panel.Image boxes are added dynamically from the program and so I have set the autoscroll property to true in panel.But when I have drag out the boxes at bottom in the panel the panel size got reduced.I have put autosize property false in panel.The panel is docked in another panel.I want to set the size of panel at run time.How can I achieve this. public form1(int[,] dummy, int columnSize, int rowSize) { this.dummy= dummy; numOfColumns = columnSize; numOfRows = rowSize; getData(); addIds = addIdArray; data = mylist; InitializeComponent(); //panel1.MinimumSize = new Size(columnSize * 40, rowSize * 40); //panel1.Height = rowSize * 40; //panel1.Width = columnSize * 40; //panel4.Height = rowSize * 40; //panel4.Width = columnSize * 40; int x, y; Structures.EmptyRectSpace space = new Structures.EmptyRectSpace(); for (int i = 0; i < data.Count; i++)// set picture boxes { space = (Structures.EmptyRectSpace)data[i]; x = space.startingJ; y = space.startingI; int h, w; h = space.length; w = space.width; p = new PictureBox(); p.Width = w * 40; p.Height = h * 40; p.BackColor = Color.DarkGreen; p.Image = Properties.Resources.v; p.BorderStyle = BorderStyle.FixedSingle; p.Name = addIdArray[i].ToString(); p.Location = new Point((x + 1 - w) * 40, (y + 1 - h) * 40); this.panel1.Controls.Add(p); } foreach (Control c in this.panel1.Controls) { if (c is PictureBox) { c.MouseDown += new MouseEventHandler(pictureBox1_MouseDown); } } this.panel1.DragOver += new System.Windows.Forms.DragEventHandler(this.panel1_DragOver); panel1.DragOver += new DragEventHandler(panel1_DragOver); panel1.DragDrop += new DragEventHandler(panel1_DragDrop); panel1.AllowDrop = true; panel2.AllowDrop = true; foreach (Control c in this.panel2.Controls) { c.MouseDown += new MouseEventHandler(pictureBox1_MouseDown); } this.panel2.DragOver += new System.Windows.Forms.DragEventHandler(this.panel2_DragOver); panel2.DragOver += new DragEventHandler(panel2_DragOver); panel2.DragDrop += new DragEventHandler(panel2_DragDrop); } This is the constructor of the form that contained panel.When it loaded the picture boxes must be added to the panel and there drag drop events of panel are implemented. Please give me a helping hand..

    Read the article

  • Validation errors from Google App Engine Logout link

    - by goggin13
    I am making a web page using the Google App Engine. I am validating my pages, and found that the logout link that is generated by the call to the users api (in python) users.create_logout_url(request.uri) does not validate as XHTML 1.0 Strict. The href in the anchor tag looks like this: /_ah/login?continue=http%3A//localhost%3A8080/&action=Logout Including a link with this anchor text throws three different validation errors: *general entity "action" not defined and no default entity *reference to entity "action" for which no system identifier could be generated *EntityRef: expecting ';' Here is a dummy page with the anchor tag in it, if you want to try it on w3c validator.Dummy Page. The logout link wont work, but you can see how the page is valid without it, but the actual text inside the href tag breaks the validation. Any thoughts on whats going on? Thank you!

    Read the article

  • Is it possible to maintain the url while redirecting to a classic asp page from a controller?

    - by Matthias
    While migrating a site from a classic asp to MVC, I'm having the problem that not all controllers are implemented yet. For those which are not implemented, I'd like to serve the classic asp page (say /product.asp?id=123) while maintaining the nice url /product/123. To accomplish this I implemented a dummy ProductController which returns a RedirectResult to the classic asp url. But that changes the url in the browsers navigation bar. Requirement has it, that the urls should always be a clean (mvc) one, eventhough the page has not yet been fully migrated. If this can't be done using a dummy controller, what would be an alternative option to solve this problem? Thanks in advance!

    Read the article

  • Conting of objects created in stack and heap for many classes

    - by viswanathan
    What is the best way to count the total number of objects created in both stack and heap for different classes. I know that in C++ new and delete operators can be overloaded and hence in the default constructor and destructor the object count can be incremented or decremented as and when the objects get created or destroyed. Further if i am to extend the same thing for object counting of objects of different classes, then i can create a dummy class and write the object count code in that class and then when i create any new class i can derive it from the Dummy class. Is there any other optimal solution to the same problem.

    Read the article

  • overloading new/delete problem

    - by hidayat
    This is my scenario, Im trying to overload new and delete globally. I have written my allocator class in a file called allocator.h. And what I am trying to achieve is that if a file is including this header file, my version of new and delete should be used. So in a header file "allocator.h" i have declared the two functions extern void* operator new(std::size_t size); extern void operator delete(void *p, std::size_t size); I the same header file I have a class that does all the allocator stuff, class SmallObjAllocator { ... }; I want to call this class from the new and delete functions and I would like the class to be static, so I have done this: template<unsigned dummy> struct My_SmallObjectAllocatorImpl { static SmallObjAllocator myAlloc; }; template<unsigned dummy> SmallObjAllocator My_SmallObjectAllocatorImpl<dummy>::myAlloc(DEFAULT_CHUNK_SIZE, MAX_OBJ_SIZE); typedef My_SmallObjectAllocatorImpl<0> My_SmallObjectAllocator; and in the cpp file it looks like this: allocator.cc void* operator new(std::size_t size) { std::cout << "using my new" << std::endl; if(size > MAX_OBJ_SIZE) return malloc(size); else return My_SmallObjectAllocator::myAlloc.allocate(size); } void operator delete(void *p, std::size_t size) { if(size > MAX_OBJ_SIZE) free(p); else My_SmallObjectAllocator::myAlloc.deallocate(p, size); } The problem is when I try to call the constructor for the class SmallObjAllocator which is a static object. For some reason the compiler are calling my overloaded function new when initializing it. So it then tries to use My_SmallObjectAllocator::myAlloc.deallocate(p, size); which is not defined so the program crashes. So why are the compiler calling new when I define a static object? and how can I solve it?

    Read the article

  • Insert A Line At The Beginnig Of A File

    - by thebourneid
    I'm trying to insert/add a line 'COMMENT DUMMY' at the beginnig of a file as a first row if /PATTERN/ not found. I know how to do this with OPEN CLOSE function. Probably after reading the file it should look something like this: open F, ">", $fn or die "could not open file: $!"; ; print F "COMMENT DUMMY\n", @array; close F; But I have a need to implement this with the use of the Tie::File function and don't know how. use strict; use warnings; use Tie::File; my $fn = 'test.txt'; tie my @lines, 'Tie::File', $fn or die "could not tie file: $!"; untie @lines;

    Read the article

  • is it possible that a greasemonkey script can work on one computer but not on another?

    - by plastic cloud
    i'm writing an greasemonkey script for somebody else. he is a moderator and i am not. and the script will help him do some moderating things. now the script works for me. as far as it can work for me.(as i am not a mod) but even those things that work for me are not working for him.. i checked his version of greasemonkey plugin and firefox and he is up to date. only thing that's really different is that i'm on a mac and he is pc, but i wouldn't think that would be any problem. this is one of the functions that is not working for him. he does gets the first and third GM_log message. but not the second one ("got some(1) .."). kmmh.trackNames = function(){ GM_log("starting to get names from the first "+kmmh.topAmount+" page(s) from leaderboard."); kmmh.leaderboardlist = []; for (var p=1; p<=(kmmh.topAmount); p++){ var page = "http://www.somegamesite.com/leaderboard?page="+ p; var boardHTML = ""; dojo.xhrGet({ url: page, sync: true, load: function(response){ boardHTML = response; GM_log("got some (1) => "+boardHTML.length); }, handleAs: "text" }); GM_log("got some (2) => "+boardHTML.length); //create dummy div and place leaderboard html in there var dummy = dojo.create('div', { innerHTML: boardHTML }); //search through it var searchN = dojo.query('.notcurrent', dummy).forEach(function(node,index){ if(index >= 10){ kmmh.leaderboardlist.push(node.textContent); // add names to array } }); } GM_log("all names from "+ kmmh.topAmount +" page(s) of leaderboard ==> "+ kmmh.leaderboardlist); does anyone have any idea what could be causing this ?? EDIT: i know i had to write according to what he would see on his mod screen. so i asked him to copy paste source of pages and so on. and besides that, this part of the script is not depending on being a mod or not. i got everything else working for him. just this function still doesn't on neither of his pc's.

    Read the article

  • How can I insert a line at the beginning of a file with Perl's Tie::File?

    - by thebourneid
    I'm trying to insert/add a line 'COMMENT DUMMY' at the beginnig of a file as a first row if /PATTERN/ not found. I know how to do this with OPEN CLOSE function. Probably after reading the file it should look something like this: open F, ">", $fn or die "could not open file: $!"; ; print F "COMMENT DUMMY\n", @array; close F; But I have a need to implement this with the use of the Tie::File function and don't know how. use strict; use warnings; use Tie::File; my $fn = 'test.txt'; tie my @lines, 'Tie::File', $fn or die "could not tie file: $!"; untie @lines;

    Read the article

  • MVC's Html.DropDownList and "There is no ViewData item of type 'IEnumerable<SelectListItem>' that has the key '...'

    - by pjohnson
    ASP.NET MVC's HtmlHelper extension methods take out a lot of the HTML-by-hand drudgery to which MVC re-introduced us former WebForms programmers. Another thing to which MVC re-introduced us is poor documentation, after the excellent documentation for most of the rest of ASP.NET and the .NET Framework which I now realize I'd taken for granted. I'd come to regard using HtmlHelper methods instead of writing HTML by hand as a best practice. When I upgraded a project from MVC 3 to MVC 4, several hidden fields with boolean values broke, because MVC 3 called ToString() on those values implicitly, and MVC 4 threw an exception until you called ToString() explicitly. Fields that used HtmlHelper weren't affected. I then went through dozens of views and manually replaced hidden inputs that had been coded by hand with Html.Hidden calls. So for a dropdown list I was rendering on the initial page as empty, then populating via JavaScript after an AJAX call, I tried to use a HtmlHelper method: @Html.DropDownList("myDropdown") which threw an exception: System.InvalidOperationException: There is no ViewData item of type 'IEnumerable<SelectListItem>' that has the key 'myDropdown'. That's funny--I made no indication I wanted to use ViewData. Why was it looking there? Just render an empty select list for me. When I populated the list with items, it worked, but I didn't want to do that: @Html.DropDownList("myDropdown", new List<SelectListItem>() { new SelectListItem() { Text = "", Value = "" } }) I removed this dummy item in JavaScript after the AJAX call, so this worked fine, but I shouldn't have to give it a list with a dummy item when what I really want is an empty select. A bit of research with JetBrains dotPeek (helpfully recommended by Scott Hanselman) revealed the problem. Html.DropDownList requires some sort of data to render or it throws an error. The documentation hints at this but doesn't make it very clear. Behind the scenes, it checks if you've provided the DropDownList method any data. If you haven't, it looks in ViewData. If it's not there, you get the exception above. In my case, the helper wasn't doing much for me anyway, so I reverted to writing the HTML by hand (I ain't scared), and amended my best practice: When an HTML control has an associated HtmlHelper method and you're populating that control with data on the initial view, use the HtmlHelper method instead of writing by hand.

    Read the article

  • No output devices in sound settings - therefore, no sound

    - by Kev Quirk
    I've just performed a fresh install of Ubuntu 13.10, and I've noticed that sound isn't working. When I go to sound settings, I can see that there is absolutely no sound devices detected. However, I do have my speakers installed and turned on, plus my machine has an internal speaker as well. I've seen other posts where people mention that they have "Dummy device" listed, this isn't the problem here, the output device section is completely blank. Any help is appreciated. Thanks, Kev

    Read the article

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