Search Results

Search found 2015 results on 81 pages for 'cf orm'.

Page 10/81 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • Kohana3 - ErrorException [ Notice ]: Undefined index: id - Error calling Auth::instance()

    - by ahmet2106
    Hello everybody, I've now a Problem with the newest Version of KohanaPHP (kohanaphp.com). After I've registered me and logged in into my test page, some minutes later, there is now the error: ErrorException [ Notice ]: Undefined index: id MODPATH/orm/classes/kohana/orm.php [ 1316 ] 1311 * 1312 * @return mixed primary key 1313 */ 1314 public function pk() 1315 { 1316 return $this->_object[$this->_primary_key]; 1317 } 1318 1319 /** 1320 * Returns whether or not primary key is empty 1321 * I've searched a lot in Google, but i never found an answer, the Problem now is, that I cant reloggin to get a new instance, because I've to call Auth::instance()-login() again, and Auth::instance() is not callable. Whats todo now, how can I fix it, is there already a new Version of ORM or Auth Module? Thanks everybody Ahmet

    Read the article

  • Use Google AppEngine datastore outside of AppEngine project

    - by Holtwick
    For my little framework Pyxer I would like to to be able to use the Google AppEngine datastores also outside of AppEngine projects, because I'm now used to this ORM pattern and for little quick hacks this is nice. I can not use Google AppEngine for all of my projects because of its's limitations in file size and number of files. A great alternative would also be, if there was a project that provides an ORM with the same naming as the AppEngine datastore. I also like the GQL approach very much, since this is a nice combination of ORM and SQL patterns. Any ideas where or how I might find such a solution? Thanks.

    Read the article

  • Empty dict-like collection problem in SQLAlchemy

    - by maksymko
    I have a mapping in SQLAlchemy that looks like this: t_property_value = sa.Table('property_value', MetaData, autoload = True, autoload_with = engine) orm.mapper(PropertyValue, t_property_value) t_estate = sa.Table('estate', MetaData, autoload = True, autoload_with = engine) orm.mapper(Estate, t_estate, properties = dict( property_hash = orm.relation(PropertyValue, collection_class = column_mapped_collection(t_property_value.c.property_id)) )) Now, everything seems to be fine, when I load the Estate object and it has some relations to PropertyValue objects. However, when it does not, then property_hash attribute is None, instead of being something dict-like, so I can not add new relations like this: estate.property_hash[prop_id] = PropertyValue(...) because I get the "'NoneType' object does not support item assignment" error. So, is there any way to force SQLAlchemy to create proper empty collection?

    Read the article

  • Resizing and saving an image in WinMobile and .NET CF throws OutOfMemoryException

    - by devguy
    I have a WinMobile app which allows the user the snap a photo with the camera, and then use for for various things. The photo can be snapped at 1600x1200, 800x600 or 640x480, but it must always be resized to 400px for the longest size (the other is proportional of course). Here's the code: private void LoadImage(string path) { Image tmpPhoto = new Bitmap(path); // calculate new bitmap size... double width = ... double height = ... // draw new bitmap Image photo = new Bitmap(width, height, System.Drawing.Imaging.PixelFormat.Format24bppRgb); using (Graphics g = Graphics.FromImage(photo)) { g.FillRectangle(new SolidBrush(Color.White), new Rectangle(0, 0, photo.Width, photo.Height)); int srcX = (int)((double)(tmpPhoto.Width - width) / 2d); int srcY = (int)((double)(tmpPhoto.Height - height) / 2d); g.DrawImage(tmpPhoto, new Rectangle(0, 0, photo.Width, photo.Height), new Rectangle(srcX, srcY, photo.Width, photo.Height), GraphicsUnit.Pixel); } tmpPhoto.Dispose(); // save new image and dispose photo.Save(Path.Combine(config.TempPath, config.TempPhotoFileName), System.Drawing.Imaging.ImageFormat.Jpeg); photo.Dispose(); } Now the problem is that the app breaks in the photo.Save call, with an OutOfMemoryException. And I don't know why, since I dispose the tempPhoto (with the original photo from the camera) as soon as I can, and I also dispose the Graphics obj. Why does this happen? It seems impossible to me that one can't take a photo with the camera and resize/save it without making it crash :( Should I restor t C++ for such a simple thing? Thanks.

    Read the article

  • CF - Set Focus to a specific control

    - by no9
    Hi ! I have a Form that has a panel with some textBoxes and checkBox that is outside the panel. Every time the Form is loaded the checkBox has focus. I have put en event handler when form loads and tried to set focus on first textbox instead having it on the checkbox. this.Activated += new EventHandler(form_Activated); in the method i try to set the focus on the first textbox in the panel private void form_Activated(object sender, EventArgs e) { if (this.parametersPanel.Controls.Count > 0) { this.parametersPanel.Focus(); (this.parametersPanel.Controls[0]).Focus(); } } This does not work, can some1 help me pls?

    Read the article

  • C# CF: encryption/decryption

    - by nuttynibbles
    Hi, i've seen many article on encrypt/decrypt of file and typically a button is used to choose the file for encrypt and another button to decrypt the file. i've seen some application like truecrypt and probably others which does file encryption on-the-fly with transparent. this means that when a encrypted file is clicked to access, it will automatically decrypt and play/open the file. then when the file is closed, it will automatically encrypt again. what are the ways to do this in c# compact framework?

    Read the article

  • Server doesn't notice when client closes socket (.NET CF & GPRS)

    - by HansA
    Client written in .NET Compact Framework running over GPRS connection. Client connects a socket to the server. The server accepts the connection. Client sends 62 bytes of data and then closes the socket. Server never detects that the client has closed the socket and is therefore not able to know that the transfer has completed. This code works fine when run over a wireless connection. Any ideas?

    Read the article

  • .NET CF -- Set Form height based on InputPanel state

    - by user354941
    Hi, So, I've got a C# project for Windows Mobile phones and I'm trying to work with the InputPanel. Specifically, I've got one form with a stack of Labels and TextBoxes that collect user input. I have an InputPanel that alerts me when the user opens the SIP. Everything works fine so far. When I get messages that the SIP status has changed, I want to change the height of the Form, which doesn't seem possible. Here's my event handler for my InputPanel: void m_InputPanel_EnabledChanged(object sender, EventArgs e) { // :( this assignment operation doesn't work and it doesn't this.ClientSize = inputPanel1.VisibleDesktop.Size; // doesn't work this.Size = inputPanel1.VisibleDesktop.Size; // assignment operation works, but isn't very useful this.visibleHeight = inputPanel1.VisibleDesktop.Height; this.InitializeUI(); } When I say that the assignment operation doesn't work, I mean that the values don't change in the debugger. I can understand that maybe I can't change the size of a Form, but I can't understand why trying to change it wouldn't throw an exception, or give a compiler error. I have my Form WindowState set to Normal instead of Maximized, but it doesn't make a difference. Also, I have read http://www.christec.co.nz/blog/archives/42 this page that tells me how I'm supposed to do this, but I can't easily put all of my controls in a Panel because I'm using a bunch of custom stuff to do alpha background controls.

    Read the article

  • C# CF: How to open specific file extension with my program

    - by nuttynibbles
    Hi, Im developing a mobile application in dot net Compact framework. I managed to edit the registry HKEY_CLASSES_ROOT so that a click on file with .xyz extension will open my application. basically, i need to do some operation on this file when it's clicked. however, i realise that if i do that the first time, it reaches program.cs at static void Main. but when the program is running and i click on the file with .xyz extension again, it doesnt loads the program static void Main. i tried setting breakpoints at the form that is currently running but still nothing. so where does it go to? how can i detect file .xyz is clicked and do something??

    Read the article

  • C# CF: file encryption/decryption on the fly

    - by nuttynibbles
    Hi, i've seen many article on encrypt/decrypt of file and typically a button is used to choose the file for encrypt and another button to decrypt the file. i've seen some application like truecrypt and probably others which does file encryption on-the-fly with transparent. this means that when a encrypted file is clicked to access, it will automatically decrypt and play/open the file. then when the file is closed, it will automatically encrypt again. some have said that the only way to detect file open is through file system filter. but is there other ways to do this in c# compact framework?

    Read the article

  • CF - Mobile Managed Gestures

    - by no9
    Im looking for a nice demo/sample using Windows Mobile Managed Gestures. I have a main view that contains a single panel. Every item in the panel is another panel containing pictureBox and a label. I would like to implement scrooling (finger flicking) to avoid using thin scroolers. Are the Windows Mobile Managed Gestures the right solution to get this working, if so can some one provide me with a begginers demo? I downloaded the source code from http://code.msdn.microsoft.com/gestureswm/Release/ProjectReleases.aspx?ReleaseId=3438 but i would need a simple example using this source. Also a question ... does this work only on 6.5? Even if i got this working is there a way to support this in 6.0 ? thanx!

    Read the article

  • CF - CAB deployment

    - by no9
    Hello. I have followed this example http://msdn.microsoft.com/en-us/library/Aa446504 and it works fine. The cab is created and i can copy it on the device and install the app. What im missing is that on device the application is not present in Programs folder. All i can do is browse to its location in /program files and run it manualy. Can some1 tell me how to: install CAB so it makes a shortcut in programs on device run the application automaticly after it has been installed thanx !

    Read the article

  • CF - MenuItem selection in MainMenu

    - by no9
    Hello. Again i wonder how can i highlight selected item in my MainMenu form. Every time i select an item only the first item is highlighted (always the same). But when a MenuItem is clicked its highlighted untill the Menu reloads. I found "checked" property on MenuItem that would generaly work, but the first item remains highlighted. There is no other properties on menuItem such as background color or selected... Can some one please direct me to the right solution? thanx

    Read the article

  • "Could not establish secure channel for SSL/TLS" in .NET CF application on smart phone

    - by Stefan Mohr
    I have a stubborn communications issue with an application running on the .NET Compact Framework 3.5 on Windows Mobile smartphones. I am constructing a web request using this code: UTF8Encoding encoding = new System.Text.UTF8Encoding(); byte[] Data = encoding.GetBytes(HttpUtility.ConstructQueryString(parameters)); httpRequest = WebRequest.Create((domain)) as HttpWebRequest; httpRequest.Timeout = 10000000; httpRequest.ReadWriteTimeout = 10000000; httpRequest.Credentials = CredentialCache.DefaultCredentials; httpRequest.Method = "POST"; httpRequest.ContentType = "application/x-www-form-urlencoded"; httpRequest.ContentLength = Data.Length; Stream SendReq = httpRequest.GetRequestStream(); SendReq.Write(Data, 0, Data.Length); SendReq.Close(); HttpWebResponse httpResponse = (HttpWebResponse)httpRequest.GetResponse(); return httpResponse.GetResponseStream(); The web service functions by receiving a JSON-encoded document as part of the URL (eg. https://site.com/ws/sync??document={"version":"1.0.0","items":[{"item_1":"item1"}]}&user=usr&password=pw), and as a response receives another JSON document as response data. This code runs fine on all emulators and PDAs running WM 5 and 6. We have seen an issue with a couple of customers running Treo smartphones (and only on the Sprint network). We have tested the code on an identical device on the AT&T network (via DeviceAnywhere) and once again the code worked as we expected. This has to be some sort of security policy on the phone, but we've been unable to determine a workaround or diagnose it thoroughly as we cannot reproduce it in house and have had to resort to getting users to assist with running test drivers for us. When this code executes, the user's device throws the following exception: System.Net.WebException Could not establish secure channel for SSL/TLS Stack trace: at System.Net.HttpWebRequest.finishGetRequestStream() at System.Net.HttpWebRequest.GetRequestStream() at OurApp.GetResponseStream(String domain, Hashtable parameters) inner exception: System.IO.IOException Authentication failed because the remote party has closed the transport stream. Stack trace: at System.Net.SslConnectionState.ClientSideHandshake() at System.Net.SslConnectionState.PerformClientHandShake() at System.Net.Connection.connect(Object ignored) at System.Threading.ThreadPool.WorkItem.doWork(Object o) at System.Threading.Timer.ring() Examining the server Apache logs shows no hits from the user's IP - I don't think the device is even attempting to send a packet before failing. If relevant, the server is running Apache on Linux and is written using the TurboGears Python framework. The server certificate is issued by a CA and is still valid. The test driver where this error was copied from was not code signed, however the same error (without the error messages) is signed with a GeoTrust certificate so we don't believe this is a code signing issue. The application installs and launches without issue on all phones - it's just establishing this SSL connection that is breaking for these users. One significant issue in troubleshooting is that there is a substantial inconvenience each time we try out a solution (need to find a "volunteer" customer), so we're really looking for a silver bullet or a better understanding of the handshaking process so we can be reasonably confident we only need to ask the user to test it one or two more times. One final mention: we have tried the sync both over ActiveSync and also over GPRS with identical results. Any thoughts would be greatly appreciated!

    Read the article

  • ListView wont release focus in .NET CF 3.5

    - by roman
    I have a form with a ComboBox and a ListView, when I press the down key on the Dpad focus moves from ComboBox to the items in the listView. But then I cant get out of the ListView and focus on the ComboBox again, I can only go up and down in the ListView items, how do I let the user go back to the ComboBox?

    Read the article

  • CF - How to "lose" focus from a control

    - by no9
    Hello. I have a control with two buttons (zoom in, zoom out). Both buttons have onClick event that handle the zoom. When any of the button is pressed, the button gets focus and bolds its border and text. Is there a way to disable/remove focus? Actually the solution im looking for would be that on mouseDown the button would receive focus and would lose it on mouseUp. thanx !

    Read the article

  • Sencha 2 -need help for cf json data (for eg:CFJSONReader )

    - by usershaf
    I am new to sencha , and using sencha 2 mvc. I have a cfc returned json data, which I want to use in my list views. I have read about CFJsonReader and CFQueryReader, but both have been scripted for EXt Js 3 x. I cant see an mvc proper code for sencha 2 anywhere else.I tried many times and all in vein.Please some help suggest me/help me to solve my problem ...My outpur is like : {"QUERY":{"COLUMNS":["CLIENTID"],"DATA":[[1013],[1010],[1016],[1017],[1013]]},"TOTALROWCOUNT":5} Please pls help me...

    Read the article

  • Use the Django ORM in a standalone script (again)

    - by Rishabh Manocha
    I'm trying to use the Django ORM in some standalone screen scraping scripts. I know this question has been asked before, but I'm unable to figure out a good solution for my particular problem. I have a Django project with defined models. What I would like to do is use these models and the ORM in my scraping script. My directory structure is something like this: project scrape #scraping scripts ... test.py web django_project settings.py ... #Django files I tried doing the following in project/scrape/test.py: print os.path.join(os.path.abspath('..'), 'web', 'django_project') sys.path.append(os.path.join(os.path.abspath('..'), 'web', 'django_project')) print sys.path print "-------" os.environ['DJANGO_SETTINGS_MODULE'] = 'django_project.settings' #print os.environ from django_project.myapp.models import MyModel print MyModel.objects.count() However, I get an ImportError when I try to run test.py: Traceback (most recent call last): File "test.py", line 12, in <module> from django_project.myapp.models import MyModel ImportError: No module named django_project.myapp.models One solution I found around this problem is to create a symbolic link to ../web/govcheck in the scrape folder: :scrape rmanocha$ ln -s ../web/govcheck ./govcheck With this, I can then run test.py just fine. However, this seems like a hack, and more importantly, is not very portable (I will have to create this symbolic link everywhere I run this code). So, I was wondering if anyone has any better solutions for my problem?

    Read the article

  • Updating join fields in an ORM command

    - by Jono
    I have a question about object relational updates on join fields. I am working on a project using codeigniter with datamapper dmz. But I think my problem is with general understanding of ORMs. So fell free to answer with any ORM you know. I have two tables, Goods and Tags. One good can have many tags. Everything is working, but I am looking for a way to merge tags. Meaning I decide I want to remove tag A and instead have everything that is tagged by it, now be tagged by tag B. I only have models for the goods and the tags. There is no separate model for the join relationship, as I believe these ORMs were designed to work. I know how to delete a tag. But I dont know how to reach into the join table to redirect the references since there is no model for the join table. I would rather use the ORM then issuing a raw SQL command.

    Read the article

  • EntityManagerFactory error on Websphere

    - by neverland
    I have a very weird problem. Have an application using Hibernate and spring.I have an entitymanger defined which uses a JNDI lookup .It looks something like this <bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"> <property name="dataSource" ref="dataSource" /> <property name="persistenceUnitName" value="ConfigAPPPersist" /> <property name="jpaVendorAdapter"> <bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter"> <property name="showSql" value="true" /> <property name="generateDdl" value="false" /> <property name="databasePlatform" value="org.hibernate.dialect.Oracle9Dialect" /> </bean> </property> </bean> <bean id="dataSource" class="org.springframework.jdbc.datasource.WebSphereDataSourceAdapter"> <property name="targetDataSource"> <bean class="org.springframework.jndi.JndiObjectFactoryBean"> <property name="jndiName" value="jdbc/pmp" /> </bean> </property> </bean> This application runs fine in DEV. But when we move to higher envs the team that deploys this application does it successfully initially but after a few restarts of the application the entitymanager starts giving this problem Caused by: javax.persistence.PersistenceException: [PersistenceUnit: ConfigAPPPersist] Unable to build EntityManagerFactory at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:677) at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:132) at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:224) at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:291) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1368) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1334) ... 32 more Caused by: org.hibernate.MappingException: **property mapping has wrong number of columns**: com.***.***.jpa.marketing.entity.MarketBrands.$performasure_j2eeInfo type: object Now you would say this is pretty obvious the entity MarketBrands is incorrect. But its not it maps to the table just fine. And the same code works on DEV. Also the jndi cannot be incorrect since it deploys and works fine initially but throws uo this error after a restart. This is weird and not very logical. But if someone has faced this or has any idea on what might be causing this Please!! help The persistence.xml for the persitence unit has very little <?xml version="1.0" encoding="UTF-8"?> <persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" version="1.0"> <persistence-unit name="ConfigAPPPersist"> <!-- commented code --> </persistence-unit> </persistence>

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >