Search Results

Search found 5172 results on 207 pages for 'stackoverflow podcast'.

Page 125/207 | < Previous Page | 121 122 123 124 125 126 127 128 129 130 131 132  | Next Page >

  • Using sizeof operator on a typedef-ed struct

    - by sskanitk
    This might be something too obvious. However, I couldn't find the specific answer though many stackoverflow threads talk about different aspects of this. typedef struct _tmp { unsigned int a; unsigned int b; } tmp; int main() { int c=10; if (c <= sizeof tmp) { printf("less\n"); } else { printf("more\n"); } return 0; } I compile this prog as - g++ -lstdc++ a.cpp I get an error - expected primary-expression before ‘)’ token I think I am missing something very obvious and straightforward. But can't seem to pinpoint it :-/ Thanks!

    Read the article

  • Changing UINavigationBar font in Swift

    - by dcgoss
    I have a UINavigationBar with a title in the middle. I have added a custom font ("Comic_Andy.ttf") to my app (I have checked info.plist to make sure it's listed, and I have checked the Copy Bundle Resources to make sure it has been added), and I would like the title of the UINavigationBar to be displayed in that font. From what I can gather it seems as though I'm supposed to use this in my ViewController: myNavigationBar.titleTextAttributes = [NSFontAttributeName: UIFont(name: "Comic_Andy", size: 22)] I placed that method in the viewDidLoad function of the ViewController. I have also tried this in the didFinishLaunchingWithOptions function of the AppDelegate: UINavigationBar.appearance().titleTextAttributes = [NSFontAttributeName: UIFont(name: "Comic_Andy", size: 22)] I am programming in Swift, in XCode 6 Beta 6. Many resources regarding this task have mentioned using a method called setTitleTextAttributes, which is nowhere to be seen. I can't figure it out for the life of me - I've probably spent close to 3 hours on it by now - I have checked every StackOverflow answer, every website, so please do not mark this as a duplicate. Many thanks in advance!

    Read the article

  • How to store account-specific information in ASP.NET MVC 2

    - by PR_
    I have an ASP.NET MVC 2 web application. There are two tables like "FIRST_KIND_OF_USERS" and "SECOND_KIND_OF_USERS". Both are mapped to the default aspnet_users table via UserId column. Each of them has it's own integer primary key column like "FirstKindOfUsersId". When a user is trying to add some data to the database, for instance, "Create a new Task" I would like to add a new row in Tasks table with "FirstKindOfUsersId" value. Where should I store or get this value? At the moment I have these possible solutions: Get "FirstKindOfUsersId" value by User.Identity.Name each time; Use SESSION[] for storing these values (Where and when should I save these ones?) Use FormsAuthenticationTicket and create own custom IIdentity class. (http://stackoverflow.com/questions/1064271/asp-net-mvc-set-custom-iidentity-or-iprincipal) Which approach is better? And if I pick the 3rd one, how to save the necessary data property and at which stage?

    Read the article

  • DIV tags not being properly nested.

    - by chustar
    I have created some <div> tags and am setting it to contain two <div> tags that are floated to both sides of the <div>. I noticed when I tried to set a background color that the containing <div> was not properly wrapping around the <div>s that its supposed to contain. I would like to know why this happens. I have seen a similar question here http://stackoverflow.com/questions/611220/why-are-these-div-tags-not-nesting-properly but no one has explained why this happens in any of the answers.

    Read the article

  • ASP.Net: Finding the cause of OutOfMemoryExpcetions

    - by Keith Bloom
    I trying to track down the cause of an OutOfMemory for a website. This site has ~12,000 .aspx pages and the last time it crashed I captured a memory dump using adplus. After some investigation I found a lot of heap fragmentation, there are around 100MB of Free blocks which can't be assigned. Digging deeper one of the Large Object Heaps is fragmented and the causes seems to be String interning as described [here][1] Could this be caused by the number of pages in the site? As they are all compiled they sit in memory and by looking at the dump they are interned and PINNED which I think means they stick around for a while. I would find this odd as there are many sites with more pages, but dynamic compilation could account for the growth in memory. What other methods are there for finding the cause of the memory leak? I have tried to capture a dump using adplus in hang mode but this fails and the IIS worker process get recycled. [1]: • http://stackoverflow.com/questions/686950/large-object-heap-fragmentation

    Read the article

  • How to read information from .3gp and .mp4 using ffmpeg-php?

    - by Neltharian
    I have a bit of a problem with ffmpeg-php. I'm trying to get some information from video files and it works pretty fine with file formats like .avi, .mpg or .flv but when I try to use .3gp or .mp4 in: $movie = new ffmpeg_movie('path/to/file/test.3gp'); I get error like this : ffmpeg_movie::__construct() []: ISO: File Type Major Brand: 3gp5 or ffmpeg_movie::__construct() []: ISO: File Type Major Brand: mp42 I installed ffmpeg-php on WAMP using instructions found here: http://stackoverflow.com/questions/1172916/how-to-install-ffmpeg-in-wampserver-2-0-windows-xp I need those information to send them to ffmpeg using exec(). Anyone could help me with this?

    Read the article

  • ruby block and returning something from block

    - by dorelal
    I am using ruby 1.8.7. p = lambda { return 10;} def lab(block) puts 'before' puts block.call puts 'after' end lab p Above code output is before 10 after I refactored same code into this def lab(&block) puts 'before' puts block.call puts 'after' end lab { return 10; } Now I am getting LocalJumpError: unexpected return. To me both the code are doing same thing. Yes in the first case I am passing a proc and in the second case I am passing a block. But &block converts that block into proc. So proc.call should behave same. And yes I have seen this post http://stackoverflow.com/questions/2325471/using-return-in-a-ruby-block

    Read the article

  • taking text from title attribute and adding it into a div in jquery

    - by ivordesign
    Basically i'm trying to grap the text from the title attribute in a link and show it in a paragaph in another div when a user hovers of the item, and then hide it when the user moves away. so far what i've got is (function($) { $.fn.showText = function() { $(this).hover( function() { $(this) .data('title', $(this).attr('title')) .removeAttr('title') .appendTo(".itemDecription p"); }, function() { $(this).attr('title', $("this").data('title')); } ); } })(jQuery); //call the plugin $(function(){ $('.wrapper ul li a').showText(); }); I got the code from somewhere else on stackoverflow, but i just can't seem to get it to work, and help would be much appriciated.

    Read the article

  • App-Engine (Java) File Upload

    - by Manjoor
    I managged to upload files on app-engine by using the following example http://stackoverflow.com/questions/1513603/how-to-upload-and-store-an-image-with-google-app-engine-java and http://www.mail-archive.com/[email protected]/msg08090.html The problem is, I am sumitting other fields along with file field as listed below <form action="index.jsp" method="post" enctype="multipart/form-data"> <input name="name" type="text" value=""> <br/> <input name="imageField" type="file" size="30"> <br/> <input name="Submit" type="submit" value="Sumbit"> </form> In my servlet I am getting null when querying name = request.getParameter("name"); Why it is so? Is there a way to retrieve text field value?

    Read the article

  • What is the scope of require_once in PHP?

    - by TMG
    Simple question: Is the scope of require_once global? For example: <?PHP require_once('baz.php'); // do some stuff foo ($bar); function foo($bar) { require_once('baz.php'); // do different stuff } ?> When foo is called, does it re-parse baz.php? Or does it rely on the already required file from the main php file (analagous to calling require_once twice consecutively for the same include file)? I saw this thread before, but it didn't quite answer the question: http://stackoverflow.com/questions/1669707/should-require-once-some-file-php-appear-anywhere-but-the-top-of-the-file Thanks for your help!

    Read the article

  • Silverlight datagrid don't show any data with anonymous query RIA services

    - by user289082
    Hi all! I have an anonymous linq query that I bind to a datagrid, when I debug it brings alright the data but it doesn't show in the datagrid, I suspect that the request to RIA services isn't completed before I bound it to the datagrid. I could use the LoadOperation<() Completed event. But it only works with Defined Entities so how can I do that? For reference here is the last post: http://stackoverflow.com/questions/2403903/linq-query-null-reference-exception Here is the query: var bPermisos = from b in ruc.Permisos where b.IdUsuario == SelCu.Id select new { Id=b.Id, IdUsuario=b.IdUsuario, IdPerfil=b.IdPerfil, Estatus=b.Estatus, Perfil=b.Cat_Perfil.Nombre, Sis=b.Cat_Perfil.Cat_Sistema.Nombre }; I'm a totally newbie sorry if is a very simple question. Thanks!!

    Read the article

  • Is there such a thing as too many tables?

    - by Stacey
    I've been searching stackoverflow for about an hour now and couldn't find any topics related, so I apologize if this is a duplicate question. My inquery is this. Is there a point at which there are too many tables in a database? Even if the structure is well organized, thought out, and perfectly facilitates the design intent? I have a database that is quickly approaching 40 tables - about 10 main ones, and over 30 ancillary tables (junction tables, 'enumeration' tables, etc). Am I just a bad developer - or should I be trying something different? It seems like so many to me, I'm really afraid at how it will impact the performance of the project. I have done a lot of condensing where possible, grouped similar things where possible, etc. The database is built in MS-SQL 2008.

    Read the article

  • User reactions to WYSIWYM

    - by David
    I am trying to decide between a WYSIWYG editor (e.g. TinyMCE, CKEditor) and a WYSIWYM (What You See Is What You Mean) editor (e.g. WMD) for my web application. There is a thread on stackoverflow that compares the two approaches. I would like to know how users, particularly computer novices, have reacted to WYSIWYM editors in deployed web applications. It could be that computer novices are confused by WYSIWYM editors, preferring the immediacy of WYSIWYG; but is that born out in real-world applications? It's not theory I'm asking about here, but empirical evidence of the acceptance or otherwise of WYSIWYM.

    Read the article

  • Uses for static generic classes?

    - by Hightechrider
    What are the key uses of a Static Generic Class in C#? When should they be used? What examples best illustrate their usage? e.g. public static class Example<T> { public static ... } Since you can't define extension methods in them they appear to be somewhat limited in their utility. Web references on the topic are scarce so clearly there aren't a lot of people using them. Here's a couple:- http://ayende.com/Blog/archive/2005/10/05/StaticGenericClass.aspx http://stackoverflow.com/questions/686630/static-generic-class-as-dictionary

    Read the article

  • OpenGL ES displaying HUD display Text can't be colored black on top of textured 3D objects

    - by ivanceras
    This is a follow-up of this question on here http://iphonedevelopment.blogspot.com/2010/02/drawing-hud-display-in-opengl-es.html It tackles on the HUD (heads up display) which is based on this tutorial http://stackoverflow.com/questions/2681102/opengl-es-displaying-hud-display-has-no-color-on-top-of-textured-3d-objects I wanted to set the "Text" in color BLACK, but it is more complicated than what I thought. Setting it to some other color other than black "glColor4f(0.0, 0.0, 0.0, 1.0);" is just fine. I assume that the culprit must be in the Blending function "glBlendFunc (GL_ONE, GL_ONE);" I experimented a lot of combinations with no luck. Has anyone experimented on this one on top of textured 3D in the backgrounds working?

    Read the article

  • Python - which multi platform GUI framework to use?

    - by Iacopo
    Hi, I've written a Python GUI application and made it run on Linux, Windows and Mac. The framework I'm using is PyGtk. The final result is not really good: the application looks horrible on Mac, and it is not really 'native' neither on Windows. Furthermore on Mac the windows' behavior is sometimes wrong, with modal dialogs appearing below the main windows. I've explored other frameworks and I've found that a porting may be really hard: PyQt it is huge, difficult to install and to distribute under Mac; PyGui is poor: I need tables and tree views at least; wxPython state explicitly that you have to use a custom python build for Mac Tkinter: didn't check it, only have the impression that it is obsolete I know this question may appear similar to http://stackoverflow.com/questions/394039/which-python-gui-framework but in that thread the portability issue is not really taken in account. Windows and Mac are a must, since most of my user have that systems. Can you also suggest some books?

    Read the article

  • AbsoluteTime with numeric argument behaves strangely.

    - by dreeves
    This is strange: DateList@AbsoluteTime[596523] returns {2078, 7, 2, 2, 42, 9.7849} But DateList@AbsoluteTime[596524] returns {1942, 5, 26, 20, 28, 39.5596} The question: What's going on? Note that AbsoluteTime with a numeric argument is undocumented. (I think I now know what it's doing but figured this is useful to have as a StackOverflow question for future reference; and I'm curious if there's some reason for that magic 596523 number.) PS: I encountered this when writing these utility functions for converting to and from unix time in Mathematica: (* Using Unix time (an integer) instead of Mathematica's AbsoluteTime... *) tm[x___] := AbsoluteTime[x] (* tm is an alias for AbsoluteTime. *) uepoch = tm[{1970}, TimeZone->0]; (* unixtm works analogously to tm. *) unixtm[x___] := Round[tm[x]-uepoch] (* tm & unixtm convert between unix & *) unixtm[x_?NumericQ] := Round[x-uepoch] (* mma epoch time when given numeric *) tm[t_?NumericQ] := t+uepoch (* args. Ie, they're inverses. *)

    Read the article

  • Why is the CoreData stack in XCode's CoreData enabled template treated as private?

    - by rob5408
    In regards to XCode templates with CoreData enabled, I've read http://stackoverflow.com/questions/2729055/unclear-use-of-property-in-window-app-using-core-data which goes over the 'what' in the templates. But I am having an issue with the 'why'. By declaring the category in the implementation file, the CoreData accessors act like private methods. The problem with that is whenever you want to use CoreData elsewhere in your app, you need some extra code. I've figured you need to either supply your own method that exposes the managed object context, such as... - (NSManagedObjectContext *)getManagedObjectContext { return self.managedObjectContext; } ...which will allow other parts of your app to use it. Or you would need to jam pack your app delegate with specific methods to return managed objects, ie getProducts or setUser. Can anyone shed light on the reasoning here?

    Read the article

  • Time to ignore IE?

    - by Delan Azabani
    In this answer: http://stackoverflow.com/questions/2781013/does-anyone-have-a-easy-to-use-png-fix-for-ie/2781041#2781041 which got voted down considerably, I point out the need to ignore Internet Explorer, or at least its old version 6, for the following reasons: It is hard to hack for, and some features don't exist at all The more you hack for IE, the longer people blindly use it (vicious cycle) My website, azabani.com, doesn't hack for IE at all. The layout looks somewhat broken in the browser, and most of my projects require features not present in IE's codebase. I would like to know if you support my view, or if you share views with those who downvoted my answer.

    Read the article

  • Why JPA injection not works on @PersistentUnit

    - by Dewfy
    Hello colleagues! It is continues of question ( http://stackoverflow.com/questions/2570976/struts-2-bean-is-not-created ) I'm using struts2 + toplink in my very simple web application under Tomcat. On the page I would like use iteration tag. That is why I've declared some factory (SomeFactory) that resolves collection of entities (Entity). Per article: http://download-uk.oracle.com/docs/cd/B32110_01/web.1013/b28221/usclient005.htm#CIHCEHHG the only thing I need is declaration: @PersistenceContext(unitName="name_in_persistence_xml") public class SomeFactory { @PersistenceUnit(unitName="name_in_persistence_xml") EntityManagerFactory emf; public EntityManager getEntityManager() { assert(emf != null); //HERE every time it is null return emf.createEntityManager(); } public Collection<Entity> getAll() { return getEntityManager().createNamedQuery("Entity.findAll").getResultList(); } } What is wrong? May be i miss something in web.xml? How to pre-init toplink for web application to allow injection happen?

    Read the article

  • Better explanation of $this-> in this example please

    - by Doug
    Referring to this question: http://stackoverflow.com/questions/2035449/why-is-oop-hard-for-me class Form { protected $inputs = array(); public function makeInput($type, $name) { echo '<input type="'.$type.'" name="'.$name.'">'; } public function addInput($type, $name) { $this->inputs[] = array("type" => $type, "name" => $name); } public function run() { foreach($this->inputs as $array) { $this->makeInput($array['type'], $array['name']; } } } $form = new form(); $this->addInput("text", "username"); $this->addInput("text", "password");** Can I get a better explanation of what the $this->input[] is doing in this part: public function addInput($type, $name) { $this->inputs[] = array("type" => $type, "name" => $name); }

    Read the article

  • Can I expect a performance gain from removing this JOIN?

    - by makeee
    I have a "items" table with 1 million rows and a "users" table with 20,000 rows. When I select from the "items" table I do a join on the "users" table (items.user_id = user.id), so that I can grab the "username" from the users table. I'm considering adding a username column to the items table and removing the join. Can I expect a decent performance increase from this? It's already quite fast, but it would be nice to decrease my load (which is pretty high). The downside is that if the user changes their username, items will still reflect their old username, but this is okay with me if I can expect a decent performance increase. I'm asking stackoverflow because benchmarks aren't telling me too much. Both queries finish very quickly. Regardless, I'm wondering if removing the join would lighten load on the database to any significant degree.

    Read the article

  • Custom app.config section with a simple list of "add" elements

    - by Joe
    How do I create a custom app.config section that is just a simple list of add elements? I have found a few examples (e.g. http://stackoverflow.com/questions/1316058) for custom sections that look like this: <RegisterCompanies> <Companies> <Company name="Tata Motors" code="Tata"/> <Company name="Honda Motors" code="Honda"/> </Companies> </RegisterCompanies> But how do I avoid the extra collection element ("Companies") so that it looks the same as the appSettings and connectionStrings sections? In other words, I'd like: <registerCompanies> <add name="Tata Motors" code="Tata"/> <add name="Honda Motors" code="Honda"/> </registerCompanies>

    Read the article

  • Two tables side by side in one column LaTeX environment

    - by Gacek
    The question is similar to this one: http://stackoverflow.com/questions/1491717/how-to-display-a-content-in-two-column-layout-in-latex but about placing two tables side by side. I have two small tables looking like that: \begin{table}[t] \begin{tabular}{|c|l||r|r||r|r|} %content goes here \end{tabular} \caption{some caption} \end{table} \begin{table}[t] \begin{tabular}{|c|l||r|r||r|r|} %content goes here \end{tabular} \caption{some caption for second table} \end{table} I have one-column document and these tables are really narrow, so I would like to display them side by side (with separate captions) insted of one under another with a lot of unused, white space. I tried to do it with this \multicols but it seems that floats (tables here) cannot be placed inside of it. Any ideas?

    Read the article

  • F# Extention Methods on Lists, IEnumberable, etc

    - by flevine100
    I have searched StackOverflow (and other sources) for this answer, but can't seem to find anything. In C#, if I had a widget definition, say: class widget { public string PrettyName() { ... do stuff here } } and I wanted to allow for easy printing of a list of Widgets, I might do this: namespace ExtensionMethods { public static PrintAll( this IEnumerable<Widget> widgets, TextWriter writer ) { foreach(var w in widgets) { writer.WriteLine( w.PrettyName() ) } } } How would I accomplish something similar with a record type and a collection (List or Seq preferrably in F#). I'd love to have a list of Widgest and be able to call a function right on the collection that did something like this. Assume (since it's F#) that the function would not be changing the state of the collection that it's attached to, but returning some new value.

    Read the article

< Previous Page | 121 122 123 124 125 126 127 128 129 130 131 132  | Next Page >