Search Results

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

Page 45/63 | < Previous Page | 41 42 43 44 45 46 47 48 49 50 51 52  | Next Page >

  • How to enable MALLOC_PROTECT_BEFORE in Xcode?

    - by Daniel S.
    After switching on some debug options in Xcode, it now tells me the following in the output: GuardMalloc[Roadcast-4010]: free: magic is 0x0000090b, not 0xdeadbeef. GuardMalloc[Roadcast-4010]: free: header magic value at 0x43f49bf0, for block 0x43f49c00-0x43f50000, has been trashed by a buffer underrun. GuardMalloc[Roadcast-4010]: Try running with MALLOC_PROTECT_BEFORE to catch this error immediately as it happens. How do I switch on MALLOC_PROTECT_BEFORE?

    Read the article

  • Java CRTP: Works for container but not for methods?

    - by Daniel
    I have a baseclass with a protected static ArrayList. I want to have a seperate ArrayList for each kind of subclass that extends this baseclass. This is when I applied CRTP: public class BaseExample<T> { protected static ArrayList<Integer> data = new ArrayList<Integer>(); } This works just fine. However, when I try to implement the following static method in the same base class, it doesn't adhere to CRTP: public static void clear() { data.clear(); } For example: class SubExample extends BaseExample<SubExample> { // insertion methods accessing 'data' field // these work fine :) } SubExample.clear(); // does not seem to clear data container Do I need to somehow explicitly specify T in my baseclass clear method? Note: These are all pure static classes.

    Read the article

  • Top 10 Graph Charting Tools

    - by Daniel
    When charting information what is the best tool to use? Of course we call know if excel, but is there something better then that? I know if things like Google Chart Tools: http://code.google.com/apis/charttools/ But want to know what the best tools out there are.

    Read the article

  • Git is slow on startup

    - by Daniel Mahadi
    Hi, I have a small problem with git in my pc, I create a new folder and i start Git Bash, but it takes so long for it load git, as in it will show the command prompt but it need a while for the git line to show up. Any clue on this? Thanks

    Read the article

  • What's the right tool for this job in Google Spreadsheets?

    - by Daniel Harvey
    Is it possible to nest simple programs within a Google doc spreadsheet, similar to how you would w/Basic in Excel? Or alternatively a simple = syntax using regex, if there is a way to do that in google docs? I want to take a list of multiple names(name1, name2, name3) in a single cell from across multiple identical sheets and transpose them to another sheet within the same spreadsheet, check for duplicates and ignore capitals, etc. Is there a way to do this?

    Read the article

  • Copying a byte buffer with JNI

    - by Daniel
    I've found plenty of tutorials / questions on Stackoverflow that deal with copying char arrays from C/JNI side into something like a byte[] in Java, but not the other way around. I am using a native C library which expects a byte array. I simply want to get data from a byte[] in java, into preferably an unsigned char[] in C. Long story short: What is the best way of copying data from a jBytearray in JNI? Is there any way to detect it's size?

    Read the article

  • Postgesql select from 2 tables. Joins?

    - by Daniel
    I have 2 tables that look like this: Table "public.phone_lists" Column | Type | Modifiers ----------+-------------------+-------------------------------------------------------------------- id | integer | not null default nextval(('"phone_lists_id_seq"'::text)::regclass) list_id | integer | not null sequence | integer | not null phone | character varying | name | character varying | and Table "public.email_lists" Column | Type | Modifiers ---------+-------------------+-------------------------------------------------------------------- id | integer | not null default nextval(('"email_lists_id_seq"'::text)::regclass) list_id | integer | not null email | character varying | I'm trying to get the list_id, phone, and emails out of the tables in one table. I'm looking for an output like: list_id | phone | email ---------+-------------+-------------------------------- 0 | | [email protected] 0 | | [email protected] 0 | | [email protected] 0 | | [email protected] 0 | | [email protected] 1 | 15555555555 | 1 | 15555551806 | 1 | 15555555508 | 1 | 15055555506 | 1 | 15055555558 | 1 | | [email protected] 1 | | [email protected] I've come up with select pl.list_id, pl.phone, el.email from phone_lists as pl left join email_lists as el using (list_id); but thats not quite right. Any suggestions?

    Read the article

  • When using DrawText, what does TextFormatFlags.Internal (a.k.a. DT_INTERNAL) do?

    - by Daniel Stutzbach
    When using TextRenderer.DrawText(), what does setting the TextFormatFlags.Internal flag actually do? Equivalently, what does setting the DT_INTERNAL flag to Win32's DrawTextEx() function do? More to the point, when should I set that flag and when should I not set it? The documentation says: "Uses the system font to calculate text metrics", but I'm not entirely sure what that means. I've done some limited testing and setting the flag seems to change how the font is rendered when using a small font size, but doesn't seem to make a difference when using a large font size.

    Read the article

  • Free/open source code editor UI control for .Net

    - by Daniel I-S
    I'm looking for a free, syntax-highlighting, possibly autocompleting 'code editor's textbox' style control for use in a Visual Studio winforms or wpf project. It should work with C# and self-defined languages. There are pay-for solutions available - something like http://www.syncfusion.com/products/user-interface-edition/windows-forms/Edit would work fine - but I am looking for something simpler, and don't need to pay for unnecessary functionality. Any ideas?

    Read the article

  • access settings from whole jquery component

    - by Pacuraru Daniel
    I am trying to develop a jquery component for dialog modals and i dont know how to access the settings from all component functions. I need to access settings,zIndex from open function and it seems to not work. (function($) { var methods = { init: function(options) { var defaults = { bgClass: "fancy-dialog-bg", bgShow: null, zIndex: 100, show: null }; var settings = $.extend(defaults, options); return this.each(function() { var obj = $(this).hide().css("position", "fixed").css("z-index", settings.zIndex).css("left", "300px").css("top", "200px"); }); }, open: function() { // alert(settings.zIndex); not working var tes = $("<div></div>").css("backgroundColor", "#f00").css("position", "fixed").css("z-index", "99").css("width", "50%").css("height", "100%").css("left", "0").css("top", "0"); $('body').append(tes); var obj = $(this); obj.show(); }, close: function() { var obj = $(this); $("#fancy-dialog-bg-" + obj.attr('id')).remove(); obj.hide(); } }; $.fn.fancyDialog = function(method) { if (methods[method]) { return methods[method].apply(this, Array.prototype.slice.call(arguments, 1)); } else if (typeof method === 'object' || !method) { return methods.init.apply(this, arguments); } else { $.error('Method ' + method + ' does not exist.'); } }; })(jQuery);

    Read the article

  • How can i check if key is pressed during click event with jquery?

    - by daniel smith
    Hi, I would like to catch a click event with jquery and be able to tell if a key was pressed at the same time so i can fork within the callback function based on the keypress. for example: $("button").click(function() { if([KEYPRESSED WHILE CLICKED]) { do something... } else { do something different... } }); Does anyone know if this is possible at all or how it can be done if it is possible?

    Read the article

  • C# performance methods of receiving data from a socket?

    - by Daniel
    Lets assume we have a simple internet socket, and its going to send 10 megabytes (because i want to ignore memory issues) of random data through. Is there any performance difference or a best practice method that one should use for receiving data? The final output data should be represented by a byte[]. Yes i know writing an arbitrary amount of data to memory is bad, and if I was downloading a large file i wouldn't be doing it like this. But for argument sake lets ignore that and assume its a smallish amount of data. I also realise that the bottleneck here is probably not the memory management but rather the socket receiving. I just want to know what would be the most efficient method of receiving data. A few dodgy ways can think of is: Have a List and a buffer, after the buffer is full, add it to the list and at the end list.ToArray() to get the byte[] Write the buffer to a memory stream, after its complete construct a byte[] of the stream.Length and read it all into it in order to get the byte[] output. Is there a more efficient/better way of doing this?

    Read the article

  • Process for beginning a Ruby on Rails project

    - by Daniel Beardsley
    I'm about to begin a Ruby on Rails project and I'd love to hear how others go through the process of starting an application design. I have quite a bit of experience with RoR, but don't have that many starting from scratch with only a vision experiences and would appreciate the wisdom of others who've been there. I'm looking for an order of events, reasons for the order, and maybe why each part is important. I can think of a few starting points, but I'm not sure where it's best to begin Model design and relationships (entities, how they relate, and their attributes) Think of user use-cases (or story-boards) and implement the minimum to get these done Create Model unit-tests then create the necessary migrations and AR models to get the tests to pass Hack out the most basic version of the simplest part of your application and go from there Start with a template for a rails app (like http://github.com/thoughtbot/suspenders) Do the boring gruntwork first (User auth, session management, ...) ...

    Read the article

  • Firefox HTML5 video playback inconsistancy

    - by Daniel Redwood
    Hey all, I've got an HTML5 video on a page. When tested locally, Chrome, Safari, and Opera work beautifully. Firefox plays it, but doesn't loop as efficiently as the others. The real problem is when it's tested off a server. Firefox doesn't play the video, but recognizes there is one there. I was wondering if all that open ended three-different-ways syntax can be swung in Firefox's favor. Thanks! HTML: <video id="vid_home" width="780" height="520" autoplay="autoplay" loop="loop"> <source src="Video/fernando.ogv" type="video/ogg" /> <source src="Video/fernando.m4v" type="video/mp4" /> Your browser does not support this videos playback. </video>

    Read the article

  • SVG via dynamic XML+XSL

    - by Daniel
    This is a bit of a vague notion which I have been running over in my head, and which I am very curious if there is an elegant method of solving. Perhaps it should be taken as a thought experiment. Imagine you have an XML schema with a corresponding XSL transform, which renders the XML as SVG in the browser. The XSL generates SVG with appropriate Javascript handlers that, ultimately, implement editing-like functionality such that properties of the objects or their locations on the SVG canvas can be edited by the user. For instance, an element can be dragged from one location to another. Now, this isn't particularly difficult - the drag/drop example is simply a matter of changing the (x,y) coordinates of the SVG object, or a resize operation would be a simple matter of changing its width or height. But is there an elegant way to have Javascript work on the DOM of the source XML document instead of the rendered SVG? Why, you ask? Well, imagine you have very complex XSL transforms, where the modification of one property results in complex changes to the SVG. You want to maintain simplicity in your Javascript code, but also a simple way to persist the modified XML back to the server. Some possibilities of how this may function: After modification of the source DOM, simply re-run the XSL transform and replace the original. Downside: brute force, potentially expensive operation. Create id/class naming conventions in the source and target XML/SVG so elements can be related back to each other, and do an XSL transform on only a subset of the new DOM. In other words, modify temporary DOM, apply XSL to it, remove changed elements from SVG, and insert the new one. Downside: May not be possible to apply XSL to temporary in-browser DOMs(?). Also, perhaps a bit convoluted or ugly to maintain. I think that it may be possible to come up with a framework that handles the second scenario, but the challenge would be making it lightweight and not heavily tied to the actual XML schema. Any ideas or other possibilities? Or is there maybe an existing method of doing this which I'm not aware of? UPDATE: To clarify, as I mentioned in a comment below, this aids in separating the draw code from the edit code. For a more concrete example of how this is useful, imagine an element which determines how it is drawn dependent on the value of a property of an adjacent element. It's better to condense that logic directly in the draw code instead of also duplicating it in the edit code.

    Read the article

  • Structuring the UI code of a single-page EXTjs Web app using Rails?

    - by Daniel Beardsley
    I’m in the process of creating a large single-page web-app using ext-js for the UI components with Rails on the backend. I’ve come to good solutions for transferring data using Whorm gem and Rails support of RESTful Resources. What I haven’t come to a conclusion on is how to structure the UI and business logic aspects of the application. I’ve had a look at a few options, including Netzke but haven’t seen anything that I really think fits my needs. How should a web-application that uses ext-js components, layouts, and controls in the browser and Rails on the server best implement UI component re-use, good organization, and maintainability while maintaining a flexible layout design. Specifically I’m looking for best-practice suggestions for structuring the code that creates and configures UI components (many UI config options will be based on user data) Should EXT classes be extended in static JS for often re-used customizations and then instantiated with various configuration options by generated JS within html partials? Should partials create javascript blocks that instantiate EXT components? Should partials call helpers that return ruby hashes for EXT component config which is then dumped to Json? Something else entirely? There are many options and I'd love to hear from people who've been down this road and found some methodology that worked for them.

    Read the article

  • ASP.NET Login Page Redirection Problem

    - by Daniel
    Hello everyone! I'm building a silverlight application hosted on ASP.NET Web App. / IIS7 / SSL-enabled website. For security, I put my silverlight page inside a Members folder in the ASP.NET Web Application, and restricted access from anonymous users.(see web.config below) when users try to access pages under Members folder, they get redirected to https://www.ssldemo.com/authenticationtest/login.aspx. (see web.config below) (I've mapped www.ssldemo.com to 127.0.0.1). for security, I'm switching to HTTPS in login.aspx, and back to HTTP after validation. below is the code for login.aspx.cs. protected void Page_Load(object sender, EventArgs e) { LoginControl.LoggedIn += new EventHandler(LoginControl_LoggedIn); } void LoginControl_LoggedIn(object sender, EventArgs e) { //for going to ReturnURL & switching back to HTTP string serverName = HttpUtility.UrlEncode(Request.ServerVariables["SERVER_NAME"]); string returnURL = Request["ReturnURL"]; Response.Redirect(ResolveClientUrl("http://" + serverName + returnURL)); } The problem is, when I deploy another application to http://www.ssldemo.com/authenticationtest/members/AnotherApplication/ and open http://www.ssldemo.com/authenticationtest/members/AnotherApplication/default.aspx, Users get redirected to https://www.ssldemo.com/authenticationtest/login.aspx?ReturnUrl=%2fauthenticationtest%2fmembers%2fanotherapplication%2fdefault.aspx. but even when I enter the correct credentials at login page, I get redirected to the same login page again, not to the ReturnUrl. when I looked into fiddler, it said '302 object moved to here.' Thank you for reading! Any input will be much appreciated. <configuration> <connectionStrings> <add name="CompanyDatabase" connectionString="Data Source=192.168.0.2;Initial Catalog=SomeTable;User ID=Username;Password=P@ssword" /> </connectionStrings> <system.web> <compilation debug="true" targetFramework="4.0" /> <authentication mode="Forms"> <forms slidingExpiration="true" timeout="15" loginUrl="https://www.ssldemo.com/authenticationtest/login.aspx" defaultUrl="~/Members/Default.aspx" > </forms> </authentication> <!--Custom Membership Provider--> <membership defaultProvider="MyMembershipProvider" userIsOnlineTimeWindow="15"> <providers> <clear /> <add name="MyMembershipProvider" type="AuthenticationTest.Web.MyMembershipProvider" connectionStringName="CompanyDatabase" applicationName="AuthenticationTest.Web"/> </providers> </membership> </system.web> <!--securing folders--> <location path="Members"> <system.web> <authorization> <deny users="?"/> </authorization> </system.web> </location> </configuration>

    Read the article

  • How can I create variable variables in ActionScript

    - by Daniel Angel
    I'm doing this mcomp7d101.onRelease = function() { getURL("javascript:Compartir("+id7d101+");"); } mcomp7d102.onRelease = function() { getURL("javascript:Compartir("+id7d101+");"); } mcomp7d103.onRelease = function() { getURL("javascript:Compartir("+id7d101+");"); } mcomp7d150.onRelease = function() { getURL("javascript:Compartir("+id7d101+");"); } you get the idea :) How can I use a for loop to do something like: for(ii = 101; ii < 150; ii++) { mcomp7d+ii.onRelease = function() { getURL("javascript:Compartir("+id7d+ii);"); } } I'm getting a syntax error. It seems that I can't create variable variables in compiled languages.

    Read the article

  • Returning the index number of an Arraylist in Java

    - by Daniel
    I would like my method public void showClassRoomDetails(String teacherName) to return the Arraylist index number using the teacherName. Thanks import java.util.ArrayList; public class School { private ArrayList<Classroom> classrooms; private String classRoomName; private String teacherName; public School() { classrooms = new ArrayList<Classroom>(); } public void addClassRoom(Classroom newClassRoom, String theClassRoomName) { classrooms.add(newClassRoom); classRoomName = theClassRoomName; } public void addTeacherToClassRoom(int classroomId, String TeacherName) { if (classroomId < classrooms.size() ) { classrooms.get(classroomId).setTeacherName(TeacherName); } } public void showClassRoomDetails(String teacherName) { for (Classroom classroom : this.classrooms) { if (classroom.returnTeacherName().equals(teacherName)) { System.out.println(classroom.returnClassRoomName()); System.out.println(classroom.returnTeacherName()); break; } } } }

    Read the article

  • Is something along the lines of nested memoization needed here?

    - by Daniel
    System.Transactions notoriously escalates transactions involving multiple connections to the same database to the DTC. The module and helper class, ConnectionContext, below are meant to prevent this by ensuring multiple connection requests for the same database return the same connection object. This is, in some sense, memoization, although there are multiple things being memoized and the second is dependent on the first. Is there some way to hide the synchronization and/or mutable state (perhaps using memoization) in this module, or perhaps rewrite it in a more functional style? (It may be worth nothing that there's no locking when getting the connection by connection string because Transaction.Current is ThreadStatic.) type ConnectionContext(connection:IDbConnection, ownsConnection) = member x.Connection = connection member x.OwnsConnection = ownsConnection interface IDisposable with member x.Dispose() = if ownsConnection then connection.Dispose() module ConnectionManager = let private _connections = new Dictionary<string, Dictionary<string, IDbConnection>>() let private getTid (t:Transaction) = t.TransactionInformation.LocalIdentifier let private removeConnection tid = let cl = _connections.[tid] for (KeyValue(_, con)) in cl do con.Close() lock _connections (fun () -> _connections.Remove(tid) |> ignore) let getConnection connectionString (openConnection:(unit -> IDbConnection)) = match Transaction.Current with | null -> new ConnectionContext(openConnection(), true) | current -> let tid = getTid current // get connections for the current transaction let connections = match _connections.TryGetValue(tid) with | true, cl -> cl | false, _ -> let cl = Dictionary<_,_>() lock _connections (fun () -> _connections.Add(tid, cl)) cl // find connection for this connection string let connection = match connections.TryGetValue(connectionString) with | true, con -> con | false, _ -> let initial = (connections.Count = 0) let con = openConnection() connections.Add(connectionString, con) // if this is the first connection for this transaction, register connections for cleanup if initial then current.TransactionCompleted.Add (fun args -> let id = getTid args.Transaction removeConnection id) con new ConnectionContext(connection, false)

    Read the article

< Previous Page | 41 42 43 44 45 46 47 48 49 50 51 52  | Next Page >