Search Results

Search found 1557 results on 63 pages for 'daniel gollas'.

Page 54/63 | < Previous Page | 50 51 52 53 54 55 56 57 58 59 60 61  | Next Page >

  • UIRemoveNotificationType invalid conversion

    - by Daniel Wood
    Hi, I'm trying to use this fairly standard line of code in my app: [[UIApplication sharedApplication] registerForRemoteNotificationTypes:(UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound)]; But am receiving the follow error: error: invalid conversion from 'int' to 'UIRemoteNotificationType' It works if I only use one of the notification types but fails every time if I try and use more than one. Any ideas what I'm doing wrong?

    Read the article

  • How can I open another tab in the browser from the Code Behind [duplicate]

    - by Daniel Powell
    This question already has an answer here: Response.Redirect to new window 18 answers I have an ASP.Net project that I am working on that involves opening another tab in the browser from the vb.net (code behind). I have tried to use the WebBrowser control to open the new tab as well as tried to use the Script manager however I have not been able to open the new tab. The button I am using is a custom button in a DevExpress GridView, and I am handling its click with this code: Private Sub ASPxGridView2_CustomButtonCallback(sender As Object, e As DevExpress.Web.ASPxGridView.ASPxGridViewCustomButtonCallbackEventArgs) Handles ASPxGridView2.CustomButtonCallback If e.ButtonID <> "customButton" Then Return End If Dim neededID = ASPxGridView2.GetRowValues(e.VisibleIndex, "target") Dim id = CStr(neededID) Dim url = ("targetPage.aspx" + "?ID=" + id) Dim wb As WebBrowser wb.Navigate(url,True) End Sub I'm not sure why this would not work, any suggestions as to how I should open a new browser tab with or without the WebBrowser works for this project. EDIT: I cannot use javascript with this ASPxGridview So I need an answer that doesn't involve modification to the javascript except through the vb.net code behind

    Read the article

  • How to join by column name

    - by Daniel Vaca
    I have a table T1 such that gsdv |nsdv |esdv ------------------- 228.90 |216.41|0.00 and a table T2 such that ds |nm -------------------------- 'Non-Revenue Sales'|'ESDV' 'Gross Sales' |'GSDV' 'Net Sales' |'NSDV' How do I get the following table? ds |nm |val --------------------------------- 'Non-Revenue Sales'|'ESDV'|0.00 'Gross Sales' |'GSDV'|228.90 'Net Sales' |'NSDV'|216.41 I know that I can this by doing the following SELECT ds,nm,esdv val FROM T1,T2 WHERE nm = 'esdv' UNION SELECT ds,nm,gsdv val FROM T1,T2 WHERE nm = 'gsdv' UNION SELECT ds,nm,nsdv val FROM T1,T2 WHERE nm = 'nsdv' but I am looking for a more generic/nicer solution. I am using Sybase, but if you can think of a way to do this with other DBMS, please let me know. Thanks.

    Read the article

  • Mapping LINQ to SQL table to another very similar table without iterating through every one

    - by Daniel Coffman
    Apologies for the vague question. Here it is: I have a table object created by LINQ to SQL. I am copying entries from one table to an "archive" table that has all the columns of the original, plus a couple extra ones. It feels sloppy to iterate through every object and manually define the mapping like: foreach (oldTable in dbContextOldTables) { var newTable = new NewTable(); newTable.TableID = oldTable.ID; newTable.Title = oldTable.Title; ... (repeat for twenty columns) newTable.ColumnThatIsntInOldTable = "Data that will be the same for every row"; dbContext.NewTables.InsertOnSubmit(newTable); } dbContext.SubmitChanges(); Is there a clever way to do this?

    Read the article

  • .NET Compact Framework Form not closing properly

    - by Daniel O
    I have a form in a Compact Framework application. When the user presses the 'X' button in the top right, the screen doesn't refresh until the users taps anywhere on the screen. The form is being shown using this code: using (var customerDetailsForm = ObjectFactory.Get<CustomerDetailsForm>()) { customerDetailsForm.AssignCustomerId(customerId); customerDetailsForm.ShowDialog(); }

    Read the article

  • VB.NET Incrementing Indexes

    - by Daniel
    Hello, I am having trouble incrementing the indexes of my list item properties. Here is the code. Dim i As Integer = 0 For x As Integer = 1 To list.Count / 19 database.ExecuteCommand("INSERT INTO Contacts VALUES ('" + _ list.Item(i) + "', '" + _ list.Item(++i) + "', '" + _ list.Item(++i) + "', '" + _ list.Item(++i) + "', '" + _ list.Item(++i) + "', '" + _ list.Item(++i) + "', '" + _ list.Item(++i) + "', '" + _ list.Item(++i) + "', '" + _ list.Item(++i) + "', '" + _ list.Item(++i) + "', '" + _ list.Item(++i) + "', '" + _ list.Item(++i) + "', '" + _ list.Item(++i) + "', '" + _ list.Item(++i) + "', '" + _ list.Item(++i) + "', '" + _ list.Item(++i) + "', '" + _ list.Item(++i) + "', '" + _ list.Item(++i) + "', '" + _ list.Item(++i) + "')") Next The ++i does not increment at all in the parameters. Thanks

    Read the article

  • .net configurable business error messages

    - by Daniel
    Hi all, I need to implement some kind of solution such that in our business logic layer when certain conditions are met an error message is returned. That error message should be configurable either in a file or table that can be edited at run time if needed. I've seen it done before a few ways and it always ends up something like "This error message is {0}" and then when the dev goes the use the message they dont neccesarily know how many (if any) parameters the message needs. Just hoping to leverage off something that may have already been done, I dont think there is a provider or anything already in the .net framework.

    Read the article

  • migrate a portion of a mysql table to SQLite

    - by daniel
    I have a mysql table set up like so: user_id | document 44 [blob] 44 [blob] 44 [blob] 46 [blob] I'd like to export all of user_id 44's data to an SQLite3 file. Best way to go about this without writing a script that reads the data and dumps it into a SQLite file?

    Read the article

  • Composable FLinq expressions

    - by Daniel
    When doing linq-to-sql in c#, you could do something like this: var data = context.MyTable.Where(x => x.Parameter > 10); var q1 = data.Take(10); var q2 = data.Take(3); q1.ToArray(); q2.ToArray(); This would generate 2 separate SQL queries, one with TOP 10, and the other with TOP 3. In playing around with Flinq, I see that: let data = query <@ seq { for i in context.MyTable do if x.Parameter > 10 then yield i } @> data |> Seq.take 10 |> Seq.toList data |> Seq.take 3 |> Seq.toList is not doing the same thing. Here it seems to do one full query, and then do the "take" calls on the client side. An alternative that I see used is: let q1 = query <@ for i in context.MyTable do if x.Param > 10 then yield i } |> Seq.take 10 @> let q2 = query <@ for i in context.MyTable do if x.Param > 10 then yield i } |> Seq.take 3 @> These 2 generate the SQL with the appropriate TOP N filter. My problem with this is that it doesn't seem composable. I'm basically having to duplicate the "where" clause, and potentially would have to duplicate other other subqueries that I might want to run on a base query. Is there a way to have F# give me something more composable? (I originally posted this question to hubfs, where I have gotten a few answers, dealing with the fact that C# performs the query transformation "at the end", i.e. when the data is needed, where F# is doing that transformation eagerly.)

    Read the article

  • Problem with .htaccess (mod_rewrite). RewriteRule's doens't work correctly

    - by daniel
    Hello, I have a problem with my two RewriteRules. .htaccess: # protect the htaccess file <files .htaccess> order allow,deny deny from all </files> RewriteEngine On Options +FollowSymlinks Options -Indexes RewriteBase /test/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^download/([0-9]+)$ download.php?id=$1 [L] RewriteRule ^(.*)$ index.php?c=view&misc=$1 [B] If the url contains download (some like this: mydomain.com/download/9) the first rule should redict this request to download.php?id=9. But it doesn't. var_dump($_GET) shows the following: array(2) { ["c"]=> string(4) "view" ["misc"]=> string(9) "index.php" } index.php Any ideas?

    Read the article

  • When to use reflection to convert datarow to an object

    - by Daniel McNulty
    I'm in a situation now were I need to convert a datarow I've fetched from a query into a new instance of an object. I can do the obvious looping through columns and 'manually' assign these to properties of the object - or I can look into reflection such as this: http://www.codeproject.com/Articles/11914/Using-Reflection-to-convert-DataRows-to-objects-or What would I base the decision on? Just scalability??

    Read the article

  • Searching major search engines with text such as <%#

    - by Daniel Dyson
    If I type '<%# vs <%"' into any of the major search engines, everything is stripped out except the 'vs'. I understand why they do this. I would just like to know if anyone knows of a way to escape illegal characters so that they are searched properly. I know this is not strictly a programming question, but it is relevant.

    Read the article

  • Function to convert a z-score into a percentage

    - by Daniel
    Google doesn't want to help! I'm able to calculate z-scores, and we are trying to produce a function that given a z-score gives us a percent of the population in a normal distribution that would be under that z-score. All I can find are references to z-score to percentage tables. Any pointers?

    Read the article

  • What is a good way to simulate O_NOFOLLOW on systems without this flag?

    - by Daniel Trebbien
    I would like to safely be able to simulate open with O_CREAT | O_WRONLY | O_TRUNC | O_NOFOLLOW and O_CREAT | O_WRONLY | O_APPEND | O_NOFOLLOW on systems that do not support O_NOFOLLOW. I can somewhat achieve what I am asking for with: struct stat lst; if (lstat(filename, &lst) != -1 && S_ISLNK(lst.st_mode)) { errno = ELOOP; return -1; } mode_t mode = S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH; int fd = open(filename, O_CREAT | O_WRONLY | O_TRUNC | O_NOFOLLOW, mode); but then I introduce a race condition and possibly a security problem. I thought about maybe creating a dummy file with only the user being able to write, kind of like touching filename, doing the lstat check, and then using chmod after I finish writing (to correct the file mode bits), but I could be overlooking something major (e.g. if the file at filename exists, is not a regular file, or is already a symbolic link). What do you think?

    Read the article

  • How is the implicit segment register of a near pointer determined?

    - by Daniel Trebbien
    In section 4.3 of Intel 64® and IA-32 Architectures Software Developer's Manual. Volume 1: Basic Architecture, it says: A near pointer is a 32-bit offset ... within a segment. Near pointers are used for all memory references in a flat memory model or for references in a segmented model where the identity of the segment being accessed is implied. This leads me to wondering: how is the implied segment register determined? I know that (%eip) and displaced (%eip) (e.g. -4(%eip)) addresses use %cs by default, and that (%esp) and displaced (%esp) addresses use %ss, but what about (%eax), (%edx), (%edi), (%ebp) etc., and can the implicit segment register depend also on the instruction that the memory address operand appears in?

    Read the article

  • Concatenation yields error with underscore

    - by Daniel
    I am trying to create a macro that brings in the name of the sheet and combine it with text. For example, for sheet one, I want it to say "ThisIs_Sheet1_Test" in I5 of Sheet1. There are several sheets but it should work for all of them. What is wrong with my code? I think the underscore might be ruining it all. Here's what I have: Dim SheetName As String Public Sub CommandButton1_Click() SheetName = ActiveSheet.Name Sheets("Sheet1").Range("I5", "I5") = ThisIs_" & SheetName.text & "_Test Sheets("Sheet2").Range("H5", "H5") = ThisIs_" & SheetName.text & "_Test Sheets("Sheet3").Range("G5", "G5") = ThisIs_" & SheetName.text & "_Test End Sub

    Read the article

  • INSERT INTO ... SELECT ... vs dumping/loading a file in MySQL

    - by Daniel Huckstep
    What are the implications of using a INSERT INTO foo ... SELECT FROM bar JOIN baz ... style insert statement versus using the same SELECT statement to dump (bar, baz) to a file, and then insert into foo by loading the file? In my messing around, I haven't seen a huge difference. I would assume the former would use more memory, but the machine that this runs on has 8GB of RAM, and I never even see it go past half used. Are there any huge (or long term) performance implications that I'm not seeing? Advantages/disadvantages of either?

    Read the article

  • What do you consider a good API Documentation?

    - by Daniel
    I have always liked the documentation on Java APIs, generally speaking, but I know some people consider them lacking. So I'm wondering, what do you consider a good example of API documentation? Please, include a link or an actual example in any answer. I want to have references that I (and others, of course) can use to improve our own documents.

    Read the article

  • PHP object cannot find method

    - by Daniel Hertz
    Hello, So I have a very simple class that has a method called getThumbUrl() but when I try calling this method on an instance I get Notice: Undefined property: FlickrImage::$getFullUrl But it is clearly there. Here is the code of the function: public function getThumbUrl() { return "http://farm".$this->_farm.".static.flickr.com/".$this->_server."/".$this->_id."_".$this->_secret."_t.jpg"; } And here is where it fails: foreach($photos as $photo) { echo "<img src='$photo->getFullUrl()' />"; } Any ideas? Thanks!

    Read the article

  • Loop through Array with conditional output based on key/value pair

    - by Daniel C
    I have an array with the following columns: Task Status I would like to print out a table that shows a list of the Tasks, but not the Status column. Instead, for Tasks where the Status = 0, I want to add a tag <del> to make the completed task be crossed out. Here's my current code: foreach ($row as $key => $val){ if ($key != 'Status') print "<td>$val</td>"; else if ($val == '0') print "<td><del>$val</del></td>"; } This seems to be correct, but when I print it out, it prints all the tasks with the <del> tag. So basically the "else" clause is being run every time. Here is the var_dump($row): array 'Task' => string 'Task A' (length=6) 'Status' => string '3' (length=1) array 'Task' => string 'Task B' (length=6) 'Status' => string '0' (length=1)

    Read the article

  • Huge burst of memory in c# service, what could be the cause?

    - by Daniel
    I'm working on a c# service application and i have this problem where out of no where and for no obvious reason, the memory for the process will climb from 150mb to almost 2gb in about 5 seconds and then back to 150mb. But nothing in our system should be using any where near that amount of memory (so its probably a bug somewhere). It might be a tight while true loop somewhere but the cpu usage at the time was very low so i thought i'd look for other ideas. Now the weirder thing is when i compile the service for 64bit, the same massive burst will occur except it exceeded 10gb of ram (paging most of it) and it just caused lots of problems with the computer and everything running on it. After a while it shuts down but it looks like windows is still willing to give it more memory. Would you have any ideas or tools that i can use in order to find this? Yes it has lots of logging however nothing in the logs stand out as to why this is happening. I can run the service in a console app mode, so my next test was going to be running it in visual studio debugger and see if i can find anything. It only happens occasionally but usually about 10-20 minutes after startup. On 32bit mode it cleans up and continues on like normally. 64bit mode it crashes after a while and uses stupid amounts of memory. But i'm really stumped as to why this is happening!!!

    Read the article

  • How can I format numbers as money in JavaScript?

    - by Daniel Magliola
    I would like to format a price in JavaScript. Basically, I have a float variable, and I'd like to have a function that will receive that variable, and output: "$ 2,500.00" What's the best way to do this? EDIT: OK, since I haven't gotten any answers better than the code I implemented, plus my own answer has been voted down and I can't put my own answer as the right one... Here it is... var DecimalSeparator = Number("1.2").toLocaleString().substr(1,1); var AmountWithCommas = Amount.toLocaleString(); var arParts = String(AmountWithCommas).split(DecimalSeparator); var intPart = arParts[0]; var decPart = (arParts.length > 1 ? arParts[1] : ''); decPart = (decPart + '00').substr(0,2); return '£ ' + intPart + DecimalSeparator + decPart;

    Read the article

< Previous Page | 50 51 52 53 54 55 56 57 58 59 60 61  | Next Page >