Search Results

Search found 91 results on 4 pages for 'tobias kienzler'.

Page 3/4 | < Previous Page | 1 2 3 4  | Next Page >

  • SD card initialization using SPI interface

    - by Tobias
    I get invalid response Codes from my SD Card(CMD8, CMD55, CMD41) Init routine: SDCS = 1; // MMC deaktiviert SPI1CON1bits.SMP = 0; SPI1CON1bits.CKE = 1; SPI1CON1bits.MSTEN = 1; SPI1CON1bits.CKP = 0; SPI1STATbits.SPIEN = 1; for(i=0;i<10;i++) SPI(0xFF); // RESET unsigned char rr=Command(CMD0,0); SDCS=1; // MMC deactivated /*OK response == 1*/ r=Command(CMD8,0); // check voltage SDCS=1; /* response == 0xC1 ?!? */ r = Command(CMD58,0); // READ_OCR unsigned char ocr1 = SPI(0xFF); unsigned char ocr2 = SPI(0xFF); unsigned char ocr3 = SPI(0xFF); unsigned char ocr4 = SPI(0xFF); unsigned char ocr5 = SPI(0xFF); /* r = 0xF8; ?!? ocr1 = 0x0F; ocr2 = 0xFF; ocr3 = 0xFF; ocr4 = 0xFF; ocr5 = 0xFF; */ SDCS=1; // INIT unsigned char rrr = 0; i=10000; do { rrr=Command(55,0); // Next is APP CMD SDCS=1; if(r) break; }while(--i>0); /* OK response == 1 */ // APP CMD 41 with OCR = 0x0F?? You can read the response codes in the comments. Is it possible the response code to CMD8 is 0xC1? Bit 7 should be 0, right? Is it a hardware error?

    Read the article

  • Use LINQ and lambdas to put string in proper case

    - by Tobias Funke
    I have this function called ProperCase that takes a string, then converts the first letter in each word to uppercase. So ProperCase("john smith") will return "John Smith". Here is the code: public string ProperCase(string input) { var retVal = string.Empty; var words = input.Split(' '); foreach (var word in words) { if (word.Length == 1) { retVal += word.ToUpper(); } else if (word.Length > 1) { retVal += word.Substring(0, 1).ToUpper() + word.Substring(1).ToLower(); } retVal += ' '; } if (retVal.Length > 0) { retVal = retVal.Substring(0, retVal.Length - 1); } return retVal; } This code workds perfectly, but I'm pretty sure I can do it more elegantly with LINQ and lambdas. Can some please show me how?

    Read the article

  • Can SqlAnywhere's UltraLiteJ DB tables be viewed in the Database Explorer of the Eclipse IDE

    - by Tobias
    Hi, I am developing a Blackberry app which should be able to access a DB. Here is my development environment and the tools I am using: Eclipse (Galileo) IDE with the Blackberry plugin installed. Blackberry OS 5.0 SQLAnywhere's DB 11 with UltraLiteJ (I am targeting Blackberrys running OS 4.1 and above) I have successfully executed a sample project for building a Blackberry application that uses the UltraLiteJ DB, following the tutorial in the UltraLiteJ documentation*. The tutorial creates, populates and retrieves data from the DB using java code. Now, I want to be able to access the tables and view data in them from the Eclipse IDE. Something similar to the FireFox plugin for SqlLite or say the Enterprise Manager for Sql Server 2005 which is a DB Explorer providing access to the StoredProcedures, Views, DB Diagrams etc. for a Database. Can someone please direct me as to how to tackle this problem? I hope the question is descriptive and clear. Much Obliged. *http://dcx.sybase.com/index.html#1101en/ulj_en11/uj-ch03.html

    Read the article

  • MinGW linking problem

    - by Tobias Langner
    I have a linking problem with MinGW. These are the calls: g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -mthreads -Wl -Wl,-subsystem,windows -o debug/Simulation.exe debug/LTNetSender.o debug/main.o debug/simulation.o debug/moc_simulation.o -L'c:/Programmieren/Qt/4.5.2/lib' -lmingw32 -lqtmaind -LC:\Programmieren\Qt\boost_1_39_0\distrib\lib -LC:\Programmieren\MinGW\lib -llibboost_system-mgw34-mt -llibws2_32 -lQtSqld4 -lQtGuid4 -lQtNetworkd4 -lQtCored4 C:\Programmieren\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\mingw32\bin\ ld.exe: cannot find -llibws2_32 The MinGW library directory is included in the library path and libws2_32.a is in this directory. Why isn't the linker finding the library?

    Read the article

  • Silverlight DRY when animating multiple UserControls on main Navigation page.

    - by Tobias op den Brouw
    Hello all. Starting with Silverlight development. Yet to read a good Silverlight book: suggestions welcome. I have a main GUI screen where 7 user controls (menu items) 'swoop' into sight, all along their own path. I have the user controls nicely seperated and behaving well. Having multiple storyboards (1 each for each menuitem) with multiple keyframe animations (X,Y,height, width) in one .XAML is not sitting well with me. Repeating all those property values is hideous, neverthemind maintenance. I've tried to move values into the app.xaml and set animation durations with style keys, but having limited success. Can anyone suggest a nice way of making this cleaner? Refactor the storyboards out to their own control? Property values in resources? Dynamic building in codebehind? Referring me to a how-to site is fine as well. Tx!

    Read the article

  • Facebook like on demand meta content scraper

    - by Tobias
    you guys ever saw that FB scrapes the link you post on facebook (status, message etc.) live right after you paste it in the link field and displays various metadata, a thumb of the image, various images from the a page link or a video thumb from a video related link (like youtube). any ideas how one would copy this function? i'm thinking about a couple gearman workers or even better just javascript that does a xhr requests and parses the content based on regex's or something similar... any ideas? any links? did someone already tried to do the same and wrapped it in a nice class? anything? :) thanks!

    Read the article

  • SharePoint 2010 is forcing me to safe PDF when opening from doc library

    - by Tobias Funke
    I have a document library with a PDF file. Whenever I click on the PDF file, I am prompted to save the file. I do not get the option of opening the file, I am forced to save it. What I want is for the PDF file to open, either in the browser or in a separate Adobe Reader window, depending on the Adobe Reader settings. I'm pretty sure SharePoint is responsible for this behavior, because if I put the PDF on my hard drive, then create a HTML file with a link to the file, it opens in the browser when I click on it. Please note: I looked at this question and did not help. I don't care if the PDF opens in the browser or in a separate Adobe Reader window, I just want it to open.

    Read the article

  • behaviour of the implicit copy constructor / assignment operator

    - by Tobias Langner
    Hello, I have a question regarding the C++ Standard. Suppose you have a base class with user defined copy constructor and assignment operator. The derived class uses the implicit one generated by the compiler. Does copying / assignment of the derived class call the user defined copy constructor / assignment operator? Or do you need to implement user defined versions that call the base class? Thank you for your help.

    Read the article

  • MVC 3 ModelView passing parameters between view & controller

    - by Tobias Vandenbempt
    I've been playing with MVC 3 in a test project and have the following issue. I have Group & Subscriber entities and those are coupled through a SubscriberGroup table. Using the DetailView of Group I open a view of SubscriberGroup containing all subscribers. This list has the option to filter. So far it all works, however when I call the AddToGroup method on the controller it fails. Specifically it goes into the method but doesn't pass the subscriberCheckedModels list. Am I doing something wrong? View: SubscriberGroup Index.aspx <%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.master" Inherits="System.Web.Mvc.ViewPage<Mail.Models.SubscriberCheckedListViewModel>" %> … <h2 class="common-box-title"> Add Subscribers to Group</h2> <p> <% using (Html.BeginForm("Index", "SubscriberGroup")) { %> <input name="filter" id="filter" type="text" /> <input type="submit" value="Search" /> <%} %> </p> <% using (Html.BeginForm("AddToGroup", "SubscriberGroup", Model,FormMethod.Get, null)) { %> <fieldset> <div style="display: inline-block; width: 70%; vertical-align: top;"> <% if (Model.subscribers.Count() != 0) { %> <table class="hor-minimalist-b"> <tr> <th> Add To Group </th> <th> Full Name </th> <th> Email </th> <th> Customer </th> </tr> <% foreach (var item in Model.subscribers) { %> <tr> <td> <%= Html.CheckBoxFor(modelItem => item.AddToGroup)%> </td> <td> <%= Html.DisplayFor(modelItem => item.subscriber.LastName)%> <%= Html.ActionLink(item.subscriber.FirstName + " " + item.subscriber.LastName, "Details", new { id = item.subscriber.SubscriberID })%> </td> <td> <%: Html.DisplayFor(modelItem => item.subscriber.Email)%> </td> <td> <%: Html.DisplayFor(modelItem => item.subscriber.Customer.Company)%> <%= Html.HiddenFor(modelItem => item.subscriber) %> </td> </tr> <% } %> <% ViewBag.subscribers = Model.subscribers; %> probeersel <%= Html.HiddenFor(model => model.subscribers) %> probeersel </table> <%} %> <%else { %> <p> No subscribers found.</p> <%} %> <input type="submit" value="Add Subscribers" /> </div> </fieldset> <%} %> Controller: SubscriberGroupController using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using System.Web.Security; using Mail.Models; namespace Mail.Controllers { public class SubscriberGroupController : Controller { private int groupID; private MailDBEntities db = new MailDBEntities(); // // GET: /SubscriberGroup/ public ActionResult Index(int id) { groupID = id; MembershipUser myObject = Membership.GetUser(); Guid UserID = Guid.Parse(myObject.ProviderUserKey.ToString()); UserCustomer usercustomer = db.UserCustomers.Single(s => s.UserID == UserID); var subscribers = from subscriber in db.Subscribers where (subscriber.CustomerID == usercustomer.CustomerID) | (subscriber.CustomerID == 0) select new SubscriberCheckedModel { subscriber = subscriber, AddToGroup = false }; SubscriberCheckedListViewModel test = new SubscriberCheckedListViewModel(); test.subscribers = subscribers; return View(test); } [HttpPost] public ActionResult Index(string filter) { MembershipUser myObject = Membership.GetUser(); Guid UserID = Guid.Parse(myObject.ProviderUserKey.ToString()); UserCustomer usercustomer = db.UserCustomers.Single(s => s.UserID == UserID); var subscribers2 = from subscriber in db.Subscribers where ((subscriber.FirstName.Contains(filter)|| subscriber.LastName.Contains(filter)) && (subscriber.CustomerID == usercustomer.CustomerID || subscriber.CustomerID == 0)) select new SubscriberCheckedModel { subscriber = subscriber, AddToGroup = false }; SubscriberCheckedListViewModel test = new SubscriberCheckedListViewModel(); test.subscribers = subscribers2.ToList(); return View(test); } [HttpPost] public ActionResult AddToGroup(SubscriberCheckedListViewModel test) { //test is null return RedirectToAction("Details", "Group", new { id = groupID }); } } } ViewModel: SubscriberGroupModel using System.Collections.Generic; using Mail; namespace Mail.Models { public class SubscriberCheckedModel { public Subscriber subscriber { get; set; } public bool AddToGroup { get; set; } } public class SubscriberCheckedListViewModel { public IEnumerable<SubscriberCheckedModel> subscribers { get; set; } } }

    Read the article

  • ANT: ways to include libraries and license issues

    - by Eric Tobias
    I have been trying to use Ant to compile and ready a project for distribution. I have encountered several problems along the way that I have been finally able to solve but the solution leaves me very unsatisfied. First, let me explain the set-up of the project and its dependencies. I have a project, lets call it Primary which depends on a couple of libraries such as the fantastic Guava. It also depends on another project of mine, lets call it Secondary. The Secondary project also features some dependencies, for example, JDOM2. I have referenced the Jar I build with Ant in Primary. Let me give you the interesting bits of the build.xml so you can get a picture of what I am doing: <project name="Primary" default="all" basedir="."> <property name='build' location='dist' /> <property name='application.version' value='1.0'/> <property name='application.name' value='Primary'/> <property name='distribution' value='${application.name}-${application.version}'/> <path id='compile.classpath'> <fileset dir='libs'> <include name='*.jar'/> </fileset> </path> <target name='compile' description='Compile source files.'> <javac includeantruntime="false" srcdir="src" destdir="bin"> <classpath refid='compile.classpath'/> </javac> <target> <target name='jar' description='Create a jar file for distribution.' depends="compile"> <jar destfile='${build}/${distribution}.jar'> <fileset dir="bin"/> <zipgroupfileset dir="libs" includes="*.jar"/> </jar> </target> The Secodnary project's build.xml is nearly identical except that it features a manifest as it needs to run: <target name='jar' description='Create a jar file for distribution.' depends="compile"> <jar destfile='${dist}/${distribution}.jar' basedir="${build}" > <fileset dir="${build}"/> <zipgroupfileset dir="libs" includes="*.jar"/> <manifest> <attribute name="Main-Class" value="lu.tudor.ssi.kiss.climate.ClimateChange"/> </manifest> </jar> </target> After I got it working, trying for many hours to not include that dependencies as class files but as Jars, I don't have the time or insight to go back and try to figure out what I did wrong. Furthermore, I believe that including these libraries as class files is bad practice as it could give rise to licensing issues while not packaging them and merely including them in a directory along the build Jar would most probably not (And if it would you could choose not to distribute them yourself). I think my inability to correctly assemble the class path, I always received NoClassDefFoundError for classes or libraries in the Primary project when launching Second's Jar, is that I am not very experienced with Ant. Would I require to specify a class path for both projects? Specifying the class path as . should have allowed me to simply add all dependencies to the same folder as Secondary's Jar, should it not?

    Read the article

  • Joomla .htaccess problem

    - by Tobias
    I am trying to rewrite from mysite.com/pokerbono/xyz to mysite.com/pokerbono.php?id=XYZ Here is the code I added in the .htaccess: #### Affiliate Links RewriteRule ^pokerbono/([a-zA-Z0-9_-]+)$ pokerbono.php?id=$1 [L] What is wrong with this rule? I tried like 100 variations and always receive a 404.

    Read the article

  • Are Conditional subquery

    - by Tobias Schulte
    I have a table foo and a table bar, where each foo might have a bar (and a bar might belong to multiple foos). Now I need to select all foos with a bar. My sql looks like this SELECT * FROM foo f WHERE [...] AND ($param IS NULL OR (SELECT ((COUNT(*))>0) FROM bar b WHERE f.bar = b.id)) with $param being replaced at runtime. The question is: Will the subquery be executed even if param is null, or will the dbms optimize the subquery out?

    Read the article

  • Monodroid and CI-Servers

    - by Tobias Schittkowski
    I would like to automate my test and release process of my Monodroid app via Jenkins. I found some infos for using Jenkins with "normal" Android projects: https://jenkins-ci.org/content/getting-started-building-android-apps-hudson http://androiddevresources.com/blog/2012/04/01/building-an-android-app-with-jenkins/ Has anyone experience on building a Monodroid app on Jenkins and running nunit tests? Are there some ready-to-modify scripts?

    Read the article

  • WFP Textblock in Listbox not clipping properly

    - by Tobias Funke
    Her's what I want: A listbox whose items consist of a stackpanel with two textblocks. The textblocks need to support wrapping, the listbox should not expand, and there should be no horizontal scrollbar. Here's the code I have so far. Copy and paste it into XamlPad and you'll see what I'm talking about. <ListBox Height="300" Width="300" x:Name="tvShows"> <ListBox.Items> <ListBoxItem> <StackPanel> <TextBlock Width="{Binding ElementName=tvShows, Path=ActualWidth}" TextWrapping="Wrap">Lost is an American live-action television series. It follows the lives of plane crash survivors on a mysterious tropical island.</TextBlock> <TextBlock Width="{Binding ElementName=tvShows, Path=ActualWidth}" TextWrapping="Wrap">Lost is an American live-action television series. It follows the lives of plane crash survivors on a mysterious tropical island.</TextBlock> </StackPanel> </ListBoxItem> <ListBoxItem> <StackPanel> <TextBlock Width="{Binding ElementName=tvShows, Path=ActualWidth}" TextWrapping="Wrap">Lost is an American live-action television series. It follows the lives of plane crash survivors on a mysterious tropical island.</TextBlock> <TextBlock Width="{Binding ElementName=tvShows, Path=ActualWidth}" TextWrapping="Wrap">Lost is an American live-action television series. It follows the lives of plane crash survivors on a mysterious tropical island.</TextBlock> </StackPanel> </ListBoxItem> </ListBox.Items> </ListBox> This seems to be doing the job of keeping the textblocks from growing, but there's one problem. The textblocks seem to be slightly larger than the listbox, causing the horizontal scrollbar to appear. This is strange because their widths are bound to the lisbox's ActualWidth. Also, if you add a few more items to the listbox (just cut and paste in XamlPad) causing the vertical scrollbar to appear, the width of the textblocks do not resize to the vertical scrollbar. How do I keep the textblocks inside the listbox, with or without the vertical scrollbar?

    Read the article

  • Reload mod_fcgid without killing Python Service

    - by Tobias
    Hi I'm currently running a Django project on my school's webserver with FCGI. I did follow the multiple guides that recommends installing a virtual local Python environment and it worked out great. The only issue i had was that "touching" my fcgi-file to reload source-files wasn't enough, but instead i had to kill the python service via SSH. This because mod_fcgid is used. However, the admin didn't think it was a great idea that i ran my own local python. He thought it better if i just told him what modules to install on root, which was a pretty nice service really. But doing this, i can no longer kill python since it's under root(though immoral as I am, I've definitely tried). The admins recommendation was that I should try too make the fcgi script reload itself by checking time stamp. I've tried to find documentation on how to do this, but fund very little and since I'm a absolute beginner i have no idea what would work. Anyone have experience running python/django under mod_fcgid or tips on where to find related guides/documentation?

    Read the article

  • Android ListView highlight multiple items

    - by Tobias Kuess
    I want my ListView to change its background for each selected item (Multi-Selection). I used this code: <ListView ... android:drawSelectorOnTop="false" android:listSelector="@android:color/darker_gray" > This works fine, but it is just possible to select one single item of the list. If I select another one the selection is resetted and the new one changes its background. Is there an easy and fast way to make it possible to select more than one item at the same time with changing the background of every selected item?

    Read the article

  • Fetch a Rails ActiveRecord 'datetime' attribute as a DateTime object.

    - by Tobias Cohen
    I have an attribute in one of my models that contains a Date/Time value, and is declared using t.datetime :ended_on in my migrations. When I fetch this value using myevent.ended_on, I get a Time object. The problem is that when I try to use this attribute as an axis in a Flotilla chart, it doesn't work properly because Flotilla only recognizes dates as Date or DateTime objects. I thought about writing a virtual attribute that will convert the existing Time value to a DateTime, but I'm wary of doing this, since I've heard that Time can't handle dates later than 2040, and I don't wish to risk creating a "2040 bug" to worry about later. Is there any way I can persuade ActiveRecord to return DateTime objects for this attribute instead of Time objects?

    Read the article

  • How does the dataset determine the return type of a scalar query?

    - by Tobias Funke
    I am attempting to add a scalar query to a dataset. The query is pretty straight forward, it's just adding up some decimal values in a few columns and returning them. I am 100% confident that only one row and one column is returned, and that it is of decimal type (SQL money type). The problem is that for some reason, the generated method (in the .designer.cs code file) is returning a value of type object, when it should be decimal. What's strange is that there's another scalar query that has the exact same SQL but is returning decimal like it should. How does the dataset designer determine the data type, and how can I tell it to return decimal?

    Read the article

  • Is it possible to implement a lightweight database using Blackberry Persistance options?

    - by Tobias
    First I would like to explain why I want to use alternate Blackberry Persistance options rather than a Blackberry database itself, say SQLite. The reason is that the application i'm designing, I want it to be used in all the previous versions of Blackberry rather than just the ones having OS 5.0 or greater. Now, coming back to the actual question, I have got a database that I want to replicate to be used in the Blackberry application. The database has 8 tables and each table has approximately 12 different columns. One of the table has 1000 rows. Now if I was to implement this DB for a Blackberry application , keeping in mind that it will work on all the versions of Blackberry, what would be the best way to implement it?

    Read the article

  • How does the dataset designer determine the return type of a scalar query?

    - by Tobias Funke
    I am attempting to add a scalar query to a dataset. The query is pretty straight forward, it's just adding up some decimal values in a few columns and returning them. I am 100% confident that only one row and one column is returned, and that it is of decimal type (SQL money type). The problem is that for some reason, the generated method (in the .designer.cs code file) is returning a value of type object, when it should be decimal. What's strange is that there's another scalar query that has the exact same SQL but is returning decimal like it should. How does the dataset designer determine the data type, and how can I tell it to return decimal?

    Read the article

  • Are conditional subqueries optimized out, if the condition is false?

    - by Tobias Schulte
    I have a table foo and a table bar, where each foo might have a bar (and a bar might belong to multiple foos). Now I need to select all foos with a bar. My sql looks like this SELECT * FROM foo f WHERE [...] AND ($param IS NULL OR (SELECT ((COUNT(*))>0) FROM bar b WHERE f.bar = b.id)) with $param being replaced at runtime. The question is: Will the subquery be executed even if param is null, or will the dbms optimize the subquery out? We are using mysql, mssql and oracle. Is there a difference between these regarding the above?

    Read the article

  • How to place a Rounded Rect UIBUTTON on UITableViewCell programmatically

    - by Tobias
    I was trying to place two uibuttons on uitableviewcell programmatically.. but unable to achieve that. somehow i managed to get the buttons through some sample project in which u can draw a nib for cell.. but i was unable to set a selector function for buttons.. in other example i can place a uiinfodark type button but when i change the type to rounded rect the button gets disappeared and i am unable to figure out why? I might be doing some silly mistake but I am really kinda stuck with it right now so I'll be very much thankful to all of you for helping in this regard.

    Read the article

< Previous Page | 1 2 3 4  | Next Page >