Search Results

Search found 158 results on 7 pages for 'gavin stevens'.

Page 3/7 | < Previous Page | 1 2 3 4 5 6 7  | Next Page >

  • Running a GWT application inside an IFRAME from an ASP.NET 3.5 app?

    - by Jay Stevens
    We are looking at integrating a full-blown GWT (Google Web Toolkit 2.0) application with an existing ASP.NET 3.5 application. My first gut reaction is that this is a horrible frankenstein idea. However, the customer has insisted that we use this application developed by a third-party. I have almost NO CONTROL over the development of the GWT app. My first thought is to actually attempt to embed this in an iFrame. Because GWT is running under Tomcat/Jakarta, it is hosted on a different server from the .NET app so the iFrame src will be to a URL on the other machine. I need to utilize our own ASP.NET authorization scheme to restrict access to the embedded GWT application. The GWT app also uses embedded java applets, which don't seem to be working right now inside the iframe. Any major problems with this approach that anyone can see? Will GWT work on an iframe while hosted on a different machine?

    Read the article

  • NFOP performance problem

    - by Jay Stevens
    We're using NFOP in a project (C#, ASP.NET 2.0) to ultimately return PDF files to the user. The process currently goes like this: Stored Procedure - XML XML - XSLT - XSL-FO XSL-FO - NFOP - PDF This works fine, the PDF is generated BEAUTIFULLY. The problem is that it takes 300+ seconds to do it. The ANTS profiler indicates that the problem is sitting in the driver.run() method inside of NFOP. It's not like this is a gargantuan amount of data, the size of the xsl-fo source going into the nfop driver object is ~980k. What's the most likely source and resolution of this problem? ANY hints or tips or answers are most appreciated, we were supposed to head to VA scan at 11 am. :|

    Read the article

  • Getting minimum - Min() - for DateTime column in a DataTable using LINQ to DataSets?

    - by Jay Stevens
    I need to get the minimum DateTime value of a column in a DataTable. The DataTable is generated dynamically from a CSV file, therefore I don't know the name of that column until runtime. Here is code I've got that doesn't work... private DateTime GetStartDateFromCSV(string inputFile, string date_attr) { EnumerableRowCollection<DataRow> table = CsvStreamReader.GetDataTableFromCSV(inputFile, "input", true).AsEnumerable(); DateTime dt = table.Select(record => record.Field<DateTime>(date_attr)).Min(); return dt; } The variable table is broken out just for clarity. I basically need to find the minimum value as a DateTime for one of the columns (to be chosen at runtime and represented by date_attr). I have tried several solutions from SO (most deal with known columns and/or non-DateTime fields). What I've got throws an error at runtime telling me that it can't do the DateTime conversion (that seems to be a problem with Linq?) I've confirmed that the data for the column name that is in the string date_attr is a date value.

    Read the article

  • Can I recover lost commits in a SVN repository using a local tracking git-svn branch?

    - by Ian Stevens
    A SVN repo I use git-svn to track was recently corrupted and a backup was recovered. However, a week's worth of commits were lost in the recovery. Is it possible to recover those lost commits using git-svn dcommit on my local git repo? Is it sufficient to run git-svn dcommit with the SHA1 of the last recovered commit in SVN? eg. > svn info http://tracked-svn/trunk | sed -n "s/Revision: //p" 252 > git log --grep="git-svn-id:.*@252" --format=oneline | cut -f1 -d" " 55bb5c9cbb5fe11a90ec2e9e1e0c7c502908cf9a > git svn dcommit 55bb5c9cbb5fe11a90ec2e9e1e0c7c502908cf9a Or will the git-svn-id need to be stripped from the intended commits? I tried this using --dry-run but couldn't tell whether it would try to submit all commits: > git svn dcommit --verbose --dry-run 55bb5c9cbb5fe11a90ec2e9e1e0c7c502908cf9a Committing to http://tracked-svn/trunk ... dcommitted on a detached HEAD because you gave a revision argument. The rewritten commit is: 55bb5c9cbb5fe11a90ec2e9e1e0c7c502908cf9a Thanks for your help.

    Read the article

  • Running a GWT application (including Applets) inside an IFRAME from an ASP.NET 3.5 app?

    - by Jay Stevens
    We are looking at integrating a full-blown GWT (Google Web Toolkit 2.0) application with an existing ASP.NET 3.5 application. My first gut reaction is that this is a horrible frankenstein idea. However, the customer has insisted that we use this application developed by a third-party. I have almost NO CONTROL over the development of the GWT app. My first thought is to actually attempt to embed this in an iFrame. Because GWT is running under Tomcat/Jakarta, it is hosted on a different server from the .NET app so the iFrame src will be to a URL on the other machine. I need to utilize our own ASP.NET authorization scheme to restrict access to the embedded GWT application. The GWT app also uses embedded java applets, which don't seem to be working right now inside the iframe. The GWT app makes calls to a backend server (using GWT-RPC?). Any major problems with this approach that anyone can see? Will GWT work on an iframe while hosted on a different machine? NOTE: SIMPLY ADDING A DIV WITH THE SAME NAME DOES NOT WORK FOR THIS!

    Read the article

  • Unit testing authorization in a Pylons app fails; cookies aren't been correctly set or recorded

    - by Ian Stevens
    I'm having an issue running unit tests for authorization in a Pylons app. It appears as though certain cookies set in the test case may not be correctly written or parsed. Cookies work fine when hitting the app with a browser. Here is my test case inside a paste-generated TestController: def test_good_login(self): r = self.app.post('/dologin', params={'login': self.user['username'], 'password': self.password}) r = r.follow() # Should only be one redirect to root assert 'http://localhost/' == r.request.url assert 'Dashboard' in r This is supposed to test that a login of an existing account forwards the user to the dashboard page. Instead, what happens is that the user is redirected back to the login. The first POST works, sets the user in the session and returns cookies. Although those cookies are sent in the follow request, they don't seem to be correctly parsed. I start by setting a breakpoint at the beginning of the above method and see what the login response returns: > nosetests --pdb --pdb-failure -s foo.tests.functional.test_account:TestMainController.test_good_login Running setup_config() from foo.websetup > /Users/istevens/dev/foo/foo/tests/functional/test_account.py(33)test_good_login() -> r = self.app.post('/dologin', params={'login': self.user['username'], 'password': self.password}) (Pdb) n > /Users/istevens/dev/foo/foo/tests/functional/test_account.py(34)test_good_login() -> r = r.follow() # Should only be one redirect to root (Pdb) p r.cookies_set {'auth_tkt': '"4c898eb72f7ad38551eb11e1936303374bd871934bd871833d19ad8a79000000!"'} (Pdb) p r.request.environ['REMOTE_USER'] '4bd871833d19ad8a79000000' (Pdb) p r.headers['Location'] 'http://localhost/?__logins=0' A session appears to be created and a cookie sent back. The browser is redirected to the root, not the login, which also indicates a successful login. If I step past the follow(), I get: > /Users/istevens/dev/foo/foo/tests/functional/test_account.py(35)test_good_login() -> assert 'http://localhost/' == r.request.url (Pdb) p r.request.headers {'Host': 'localhost:80', 'Cookie': 'auth_tkt=""\\"4c898eb72f7ad38551eb11e1936303374bd871934bd871833d19ad8a79000000!\\"""; '} (Pdb) p r.request.environ['REMOTE_USER'] *** KeyError: KeyError('REMOTE_USER',) (Pdb) p r.request.environ['HTTP_COOKIE'] 'auth_tkt=""\\"4c898eb72f7ad38551eb11e1936303374bd871934bd871833d19ad8a79000000!\\"""; ' (Pdb) p r.request.cookies {'auth_tkt': ''} (Pdb) p r <302 Found text/html location: http://localhost/login?__logins=1&came_from=http%3A%2F%2Flocalhost%2F body='302 Found...y. '/149> This indicates to me that the cookie was passed in on the request, although with dubious escaping. The environ appears to be without the session created on the prior request. The cookie has been copied to the environ from the headers, but the cookies in the request seems incorrectly set. Lastly, the user is redirected to the login page, indicating that the user isn't logged in. Authorization in the app is done via repoze.who and repoze.who.plugins.ldap with repoze.who_friendlyform performing the challenge. I'm using the stock tests.TestController created by paste: class TestController(TestCase): def __init__(self, *args, **kwargs): if pylons.test.pylonsapp: wsgiapp = pylons.test.pylonsapp else: wsgiapp = loadapp('config:%s' % config['__file__']) self.app = TestApp(wsgiapp) url._push_object(URLGenerator(config['routes.map'], environ)) TestCase.__init__(self, *args, **kwargs) That's a webtest.TestApp, by the way. The encoding of the cookie is done in webtest.TestApp using Cookie: >>> from Cookie import _quote >>> _quote('"84533cf9f661f97239208fb844a09a6d4bd8552d4bd8550c3d19ad8339000000!"') '"\\"84533cf9f661f97239208fb844a09a6d4bd8552d4bd8550c3d19ad8339000000!\\""' I trust that that's correct. My guess is that something on the response side is incorrectly parsing the cookie data into cookies in the server-side request. But what? Any ideas?

    Read the article

  • MySQL Hashing Function Implementation

    - by Jonas Stevens
    I know that php has md5(), sha1(), and the hash() functions, but I want to create a hash using the MySQL PASSWORD() function. So far, the only way I can think of is to just query the server, but I want a function (preferably in php or Perl) that will do the same thing without querying MySQL at all. For example: MySQL hash - 464bb2cb3cf18b66 MySQL5 hash - *01D01F5CA7CA8BA771E03F4AC55EC73C11EFA229 Thanks!

    Read the article

  • Conditional Batch file renaming with mysql data

    - by Paul Stevens
    Hello, I wonder if anyone knows how could I rename multiple files, all of them originally named with same structure, and add some data extracted from a mysql DB according to specifics rules. For example I have 500 files named with this vars: ID NAME ADDRESS PHONE.wav = 1234567 PAULSIMON WESTDR122 9942213456.wav Now I need to rename files taking some data from the databases for each file, and append the data from a query appended to the filename. For example add the data resulting from a query Where some conditions match, and the data to build the query is taked from original file name, as ID or NAME. i other words, lets say that I want to build a query taking ID & NAME from file 1234567 PAULSIMON WESTDR123 9942213456.wav as WHERE statements to take another value as BirthDATE and add this to new filename, so final result should be: ID NAME ADDRESS PHONE BIRTHDATE.wav I will appreciate any help on this. I need this to be done on a LINUX server.

    Read the article

  • incrementing in php

    - by Michael Stevens
    I have a function that works on other pages but on this particular page its not working 100% the piece of code that is failing to work is: $query = "SELECT * FROM rank_punting JOIN rank_player ON rank_player.full_name=rank_punting.name WHERE active='1' AND class='$class' ORDER BY ABS(`rank_punting`.`rank_final`) ASC"; $rank = 0; $lastpct = 0; $db->setQuery($query); $result = $db->query(); if(mysql_num_rows($result) > 0) { while($row = mysql_fetch_array($result, MYSQL_ASSOC)) { if ($row['rank_final'] > $lastpct) { $rank++; $lastpct = $row['rank_final']; } $name = $row['name']; $s1= $row['s1']; $s2= $row['s2']; $s3= $row['s3']; $s4= $row['s4']; $s5= $row['s5']; $s6= $row['s6']; $s7= $row['s7']; $s8= $row['s8']; $s9= $row['s9']; $c1= $row['c1']; $c2= $row['c2']; $c3= $row['c3']; $c4= $row['c4']; $c5= $row['c5']; $c6= $row['c6']; $v1= $row['v1']; $v2= $row['v2']; $comp= $row['comp_rank_final']; $season= $row['season_rank_final']; $final=$row['rank_final']; $link = "website_url"; $link2 = "<a href=\"http://{$link}\" target='_blank'>{$name}<br>Profile Page</a>"; if ($link = ''){$link2 = "<a href='index.php?option=com_ranking&view=playerprofile&player={$name}' >{$name}<br>Profile Page</a>";} echo '<tr>'; echo " <th scope'row'>{$link2} {$lastpct} </th>"; echo "<td>"; echo 'DEBUG: '; echo $row['rank_final']; echo $lastpct;echo "{$rank}</td>"; echo "<td> Competition</td>"; echo "<td> {$comp}</td>"; echo "<td> {$c1}</td>"; echo "<td> {$c2}</td>"; echo "<td> {$c3}</td>"; echo "<td> {$c4}</td>"; echo "<td> {$c5}</td>"; echo "<td> {$c6}</td>"; echo "<td> {$c7}</td>"; echo "<td> {$c8}</td>"; echo "<td> {$v2}</td>"; echo "</tr>"; echo '<tr>'; echo "<th scope'row'> </th>"; echo "<td> </td>"; echo "<td> Game Film</td>"; echo "<td> {$season}</td>"; echo "<td> {$s1}</td>"; echo "<td> {$s2}</td>"; echo "<td> {$s3}</td>"; echo "<td> {$s4}</td>"; echo "<td> {$s5}</td>"; echo "<td> {$s7}</td>"; echo "<td> {$s8}</td>"; echo "<td> {$s6}</td>"; echo "<td> {$v1}</td>"; echo "</tr>"; } } //---------------- echo '</tbody> </table>'; }

    Read the article

  • How to Synchronize Session / Security between ASP.NET and Tomcat?

    - by Jay Stevens
    I have an Asp.NET 3.5 application with security/authentication. I have a second application (built using GWT and running on Windows Tomcat) running on a different machine. I need to make the second application available to the user via a link generated from the .NET application. This part is easy, I have constructed the link in the asp.net page and the user can click on it to start working in the GWT/Tomcat session. My question is this... How do I set it up so that the Tomcat/GWT application is Only Accessible via the link in my asp.NET application? I don't want the user to be able to copy the link from my asp.net page and then share that with someone else who is not authenticated within my asp.net application.

    Read the article

  • telephone application programming on Linux

    - by Daniel Stevens
    I'm a Linux user looking to write a program which will pick up the phone, dial a number, play a recording and record what the person on the other end of the line says and save it to an audio file. I will want to use the modem that came with my computer if possible. What should I use to write this program?

    Read the article

  • PHP Form Automatic Submission

    - by sex stevens
    I need to create a PHP script that runs around the clock and re-submits a form without actually loading the form, just sending the same request over and over. I used a program called WireShark to record my packets and play them back using a packet player. This took two hours of troubleshooting and configuring. When everything finally worked, it turns out the end result was a dead end. The packets being sent did not affect anything. This code is what the script needs to resubmit: <a href="#" onclick="_('_tf11').value=15; return false;">(15)</a> <input type="image" id="btn_train" class="dynamic_img" value="ok" name="s1" src="assets/x.gif" alt="Training"> Okay, I know that here on stackoverflow you can't just ask people to do your work. The problem is that I don't even know where to start here. So please at least give me a direction, or a function name or a lead on how to be able to submit this form. Then I'll write a program and you guys can help me finish it if I will need help. here is what I made: The program: <?php //create array of data to be posted $post_data['tf[11]'] = '10000'; $post_data['s1'] = 'ok'; //traverse array and prepare data for posting (key1=value1) foreach ( $post_data as $key => $value) { $post_items[] = $key . '=' . $value; } //create the final string to be posted using implode() $post_string = implode ('&', $post_items); //create cURL connection $curl_connection = curl_init('http://crusadertrav.com/build.php?id=33'); //set options curl_setopt($curl_connection, CURLOPT_CONNECTTIMEOUT, 30); curl_setopt($curl_connection, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"); curl_setopt($curl_connection, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl_connection, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($curl_connection, CURLOPT_FOLLOWLOCATION, 1); //set data to be posted curl_setopt($curl_connection, CURLOPT_POSTFIELDS, $post_string); //perform our request $result = curl_exec($curl_connection); //show information regarding the request print_r(curl_getinfo($curl_connection)); echo curl_errno($curl_connection) . '-' . curl_error($curl_connection); //close the connection curl_close($curl_connection); ?> The forms: <input type="text" class="text" id="_tf11" name="tf[11]" value="0" maxlength="4"> <input type="image" id="btn_train" class="dynamic_img" value="ok" name="s1" src="assets/x.gif" alt="Training"> The result: Array ( [url] => http://crusadertrav.com/index.php [content_type] => text/html; charset=UTF-8 [http_code] => 200 [header_size] => 895 [request_size] => 350 [filetime] => -1 [ssl_verify_result] => 0 [redirect_count] => 1 [total_time] => 2.781 [namelookup_time] => 0 [connect_time] => 0.532 [pretransfer_time] => 0.532 [size_upload] => 0 [size_download] => 10655 [speed_download] => 3831 [speed_upload] => 0 [download_content_length] => 0 [upload_content_length] => 0 [starttransfer_time] => 0.954 [redirect_time] => 0.906 [certinfo] => Array ( ) [primary_ip] => 5.154.88.71 [primary_port] => 80 [local_ip] => 192.168.11.52 [local_port] => 3222 [redirect_url] => ) 0-

    Read the article

  • March 2012 - SSIS Training in London!

    - by andyleonard
    I am honored to announce I will be delivering From Zero To SSIS! in London, England 5-9 Mar 2012. This course is delivered in cooperation with my friends at TechniTrain who provide awesome training by talented technologists like Chris Webb ( Blog ), Gavin Payne ( Blog ), and Christian Bolton ( Blog ). This opportunity grew out of conversations at SQLBits 9 in Liverpool in September 2011. I had an awesome time at SQLBits and encourage everyone to attend the conference if you have the opportunity to...(read more)

    Read the article

  • Next Best Action: an emerging engagement paradigm can elevate customer experience to the next level

    - by Richard Lefebvre
    As customer interactions increase across an expanding number of communication channels, business leaders are struggling to understand and engage with each customer effectively. To address this challenge, leading organizations are adopting strategies around “next best action,” a decision-support model that systematically identifies the next best step to take in the customer conversation—whether that action is providing additional information or targeted services, presenting a unique offer, or taking no action at all... Read the complete article - by Mark A. Stevens (vice president, Insight and Customer Strategy, at Oracle) - here

    Read the article

  • MVC Partial View to Call Display Pop-up window using jquery

    - by Gavin campbell
    Hi I have a index page the renders objects from my database as a treeview, each item has a link href="/MessageGroupType/Edit/1002 that makes an Ajax call to display a partial view in a DIV. Within the partial view there is a delete button which calls my controller to delete the item. However, i do a check to make sure the item can be deleted, if the item cant be deleted then i wish a pop-up to appear back on the edit form telling the user they cant delete this record. In my Edit partial view i have the following code " type="text/javascript" $(function() { $("#dialog").dialog(); }); <% if (Boolean.Parse(ViewData["DisplayWindow"].ToString())){% This Mesage group Type Cannot be deleted as is linked to other message group Types <% }% So my main questions are Can i make a reference to a javascript script within my Partial View (i dont want my master page to be called on the partial view) When i dynamically load the partial view data into my DIV - can i then after calling my controller insert another DIV into the first DIV. I am i doing this the wrong way - so any pointers is appreciated Cheers

    Read the article

  • Cannot find System.Web.Script.Service namespace error after upgrading to Visual studio 2010

    - by Gavin
    I've just upgraded a VS 2008 project to VS 2010, converting the project but keeping the target as .NET 3.5 (SP1 is installed). My project worked without issue under VS 2008 on another machine. I've added references to System.Web.Extensions.dll but I'm still getting the following errors from code in the App_Code folder: 1) Cannot find System.Web.Script.Service namespace 2) Type 'System.Web.Script.Services.ScriptService' is not defined. 3) Type 'System.Runtime.Serialization.Json.DataContractJsonSerializer' is not defined. Anyone have any ideas what the problem might be as I'm pretty stumped? :(

    Read the article

  • Setting Session Variable from UpdatePanel

    - by Gavin
    I am using ASP.NET 2.0 AJAX Extensions 1.0 with the version v1.0.20229 of the AJAX Control Toolkit (which to my knowledge is the latest for .NET 2.0/Visual Studio 2005). My web page (aspx) has a DropDownList control on an UpdatePanel. In the handler for the DropDownList's SelectedIndexChanged event I attempt to set a session variable. The first time the event is fired, I get a Sys.WebForms.PageRequestManagerParserErrorException: "The message received from the server could not be parsed". If I continue, subsequent SelectedIndexChanged's are handled successfully. I have stumbled upon a solution whereby if I initialise the session variable in my Page_Load (so the event handler is just setting the value of a session variable that already exists as opposed to creating a new one) the problem goes away. I'm happy to do this, but I'm curious as to exactly what the underlying cause is. Can anyone explain? (My suspicion is that setting the session variable receives a response from the server which is then returned to the 'caller', but it's not the sort of response it knows how to deal with causing the exception?) EDIT: I reproduced the problem in a seperate little project: Default.aspx <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="SessionTest._Default" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title>Untitled Page</title> </head> <body> <form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server" /> <div> <asp:UpdatePanel id="upCategorySelector" runat="server"> <ContentTemplate> Category: <asp:DropDownList ID="ddlCategory" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlCategories_SelectedIndexChanged"> <asp:ListItem>Item 1</asp:ListItem> <asp:ListItem>Item 2</asp:ListItem> <asp:ListItem>Item 3</asp:ListItem> </asp:DropDownList> </ContentTemplate> </asp:UpdatePanel> </div> </form> </body> </html> Default.aspx.cs using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; namespace SessionTest { public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { // If I do this, the exception does not occur. if (Session["key"] == null) Session.Add("key", 0); } protected void ddlCategories_SelectedIndexChanged(object sender, EventArgs e) { // If Session["key"] has not been created, setting it from // the async call causes the excaption Session.Add("key", ((DropDownList)sender).SelectedValue); } } }

    Read the article

  • Using Git with VB6

    - by Gavin Schultz
    Our company has a large codebase in VB6, and we currently use VSS which, for all that we hate about it, at least integrates into the VB6 IDE. My own team, which is using .NET, are now looking into alternative SCMs like my personal favourite, Git. With Git Extensions, it seems we will be able to integrate Git commands into the Visual Studio IDE pretty well. However, the question has been asked: could Git be used for our VB6 codebase too? Of course I assume the files themselves would work fine in git repositories, but no doubt developers would complain if they had to use the command-line to do all their source control. But has anyone had any experience using VB6 and Git? Any integration available from within the VB6 IDE? Or is it perhaps not that much of a hassle to not have the IDE integration? And do I get a badge for being the first to create the absurd tag combination of [vb6] and [git]?

    Read the article

  • How can I close a Window using the OS-X ScriptingBridge framework, from Perl?

    - by Gavin Brock
    Problem... Since MacPerl is no longer supported on 64bit perl, I am trying alternative frameworks to control Terminal.app. I am trying the ScriptingBridge, but have run into a problem passing an enumerated string to the closeSaving method using the PerlObjCBridge. I want to call: typedef enum { TerminalSaveOptionsYes = 'yes ' /* Save the file. */, TerminalSaveOptionsNo = 'no ' /* Do not save the file. */, TerminalSaveOptionsAsk = 'ask ' /* Ask the user whether or not to save the file. */ } TerminalSaveOptions; - (void) closeSaving:(TerminalSaveOptions)saving savingIn:(NSURL *)savingIn; // Close a document. Attempted Solution... I have tried: #!/usr/bin/perl use strict; use warnings; use Foundation; # Load the ScriptingBridge framework NSBundle->bundleWithPath_('/System/Library/Frameworks/ScriptingBridge.framework')->load; @SBApplication::ISA = qw(PerlObjCBridge); # Set up scripting bridge for Terminal.app my $terminal = SBApplication->applicationWithBundleIdentifier_("com.apple.terminal"); # Open a new window, get back the tab my $tab = $terminal->doScript_in_('exec sleep 60', undef); warn "Opened tty: ".$tab->tty->UTF8String; # Yes, it is a tab # Now try to close it # Simple idea eval { $tab->closeSaving_savingIn_('no ', undef) }; warn $@ if $@; # Try passing a string ref my $no = 'no '; eval { $tab->closeSaving_savingIn_(\$no, undef) }; warn $@ if $@; # Ok - get a pointer to the string my $pointer = pack("P4", $no); eval { $tab->closeSaving_savingIn_($pointer, undef) }; warn $@ if $@; eval { $tab->closeSaving_savingIn_(\$pointer, undef) }; warn $@ if $@; # Try a pointer decodes as an int, like PerlObjCBridge uses my $int_pointer = unpack("L!", $pointer); eval { $tab->closeSaving_savingIn_($int_pointer, undef) }; warn $@ if $@; eval { $tab->closeSaving_savingIn_(\$int_pointer, undef) }; warn $@ if $@; # Aaarrgghhhh.... As you can see, all my guesses at how to pass the enumerated string fail. Before you flame me... I know that I could use another language (ruby, python, cocoa) to do this but that would require translating the rest of the code. I might be able to use CamelBones, but I don't want to assume my users have it installed. I could also use the NSAppleScript framework (assuming I went to the trouble of finding the Tab and Window IDs) but it seems odd to have to resort to it for just this one call.

    Read the article

  • Are web-safe colors still relevant?

    - by Gavin Miller
    Since the vast majority of monitors are 16-bit color or more, including mobile devices, does it make sense to even consider web-safe colors when choosing color schemes? Or is it something that ought to be relegated to history as a piece of trivia? For those of you that don't know what web-safe colors are: Another set of 216 color values is commonly considered to be the "web-safe" color palette, developed at a time when many computer displays were only capable of displaying 256 colors. A set of colors was needed that could be shown without dithering on 256-color displays; the number 216 was chosen partly because computer operating systems customarily reserved sixteen to twenty colors for their own use; it was also selected because it allows exactly six shades each of red, green, and blue (6 × 6 × 6 = 216). The list of colors is often presented as if it has special properties that render them immune to dithering. In fact, on 256-color displays applications can set a palette of any selection of colors that they choose, dithering the rest. These colors were chosen specifically because they matched the palettes selected by the then leading browser applications. [Wikipedia]

    Read the article

  • ColdFusion 8: Database Connection Reset Error

    - by Gavin
    I have been getting these intermittent ColdFusion Database connection reset errors and was wondering if anyone had experience with this and had a particular solution that worked? Here is the error: Error Executing Database Query.[Macromedia][SQLServer JDBC Driver]A problem occurred when attempting to contact the server (Server returned: Connection reset). Please ensure that the server parameters passed to the driver are correct and that the server is running. Also ensure that the maximum number of connections have not been exceeded for this server. This doesn't happen with any particular query, the code breaks in different queries every time, returning a SQLState error 08s01. These query's logic are fine, no logic errors etc. I checked the network logs and there were no database server connection refusals at the time of the error. Once the first error occurs, it keeps happening for no more than a minute or so at random times of the day, every few days. I've googled this thing and so far anyone that has had this issue was only on CF6 or 7, which the fixes coldFusion put out are only for CF6 or 7. Server configuration wise: The ColdFusion server is version 8 The database server is SQL Server 2005 Standard The database connections allowed setting is set to unlimited on both SQL Server and ColdFusion Any help would be greatly appreciated, Thanks!

    Read the article

< Previous Page | 1 2 3 4 5 6 7  | Next Page >