Posts

entity framework 4 - How to clean/Reset ObjectContext in EF 4 -

I have a sorted structure with millions of records. I have been making a recursive scan on DB to update some connections and some data I am the problem that I get an exception exception because the entire DB is finally loaded on the reference (lazy). That data needs to be in the context of no reference. I can not use references (reference ...) because I want to reference the context because I am doing a recursive scan. Please take recurring as a fact. Thank you Such an operation is not really well controlled and neither the institutions By using it it is well done on the scale. I support stored procedures for batch ops. If you want to remove / dump objects from the context, then I believe that some information (solution to your problem below) is.

c# - Persian Calendar Problem with CultureInfo -

What's wrong with this code? // Error (exception) Message: Valid Calendar System for an Unrecognized Culture. Globalization. CulverInfo CI = New System Globalization. Crop ("FA-IR"); Ci.DateTimeFormat.Calendar = New system. Globalization.PersianCalendar (); Application.CurrentCulture = ci; And what's the solution? Can I add a calendar type to the Windows XP regional option? :) A filthy reflection-based solution is here:

php - Whats the best way to do an external search with dynamique content? -

I want to create an external search function for other websites to be able to search in my database. Now I have the problem that there are many drop-down boxes in which there is a dynamic content, which means the content comes from the database. This will only work if the external search plugin includes a php file that receives content from the database. But imagine now that people who do not use PHP, they want to search on their website. Maybe I am missing the point, but why do not you have some CGI behind the "Phfinini database search" link Can you put it? The CGI can search anything, especially with the dynamic content of any dropdown or something else. - Pete

mysql - Replacing \r\n with PHP -

I have a post form that includes my text in a MySQL database. I use $ post_text = mysql_real_escape_string (htmlspecialchars ($ _ POST ['text'])); Want to automatically change and \ r \ n I tried $ Text = str_replace ('\\ r \\ n', '', $ text); $ Text = str_replace ('\ r \ n', '', $ text); $ Text = str_replace ('\\ R \\ N', '', $ text); $ Text = str_replace ('\ R \ N', '', $ text); $ Text = str_replace ('/ \ r \\ n', '', $ text); $ Text = str_replace ('/ r / n', '', $ text); $ Text = str_replace ('/ \ r \\ N', '', $ text); $ Text = str_replace ('/ R / N', '', $ text); but \ r \ n is always included in my database entries. How can I fix this? The main problem with all the changes you make is that both \ n and \ r are escape characters that are saved only when you use them in double-quoted strings in PHP '\ r \ N ...

java - Getting hibernate entity error -

I'm using hibernate in the Spring app but due to some problem I can not use spring injection, so manually Session is to announce a declaration like factory below As I am using annotations in the unit class, I get the following error org.hibernate.MappingException: unknown entity: com.vaannila .domain.Registration & lt ;? XML version = "1.0" encoding = "UTF-8"? & Gt; & Lt ;! DOCTYPE Hibernate-Configuration PUBLIC "- // Hibernate / Hibernate Configuration DTD 3.0 / N" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"> & Lt; Hibernate-configuration & gt; & Lt; Session-Factory & gt; & Lt ;! - We are using MySQL database so that the quote with MySQL - & gt; & Lt; Property Name = "hibernate.dialect" & gt; Org.hibernate.dialect.MySQL5InnoDBDialect & lt; / Property & gt; & Lt ;! - Enable it to see the SQL statement in the log - & gt; & Lt; Property...

PHP Remove key from associative array -

I have a PHP array that looks like this: index key value [0 ] 1 Waiting for confirmation [1] 2 constituted [2] 3 in progress [3] 4 full [4] 5 Mark as spam When I assume the var_dump array So I get this: / P> array (5) {[0] => Array (2) {["key"] = & gt; String (1) "1" ["value"] = & gt; String (25) "Waiting for confirmation"} [1] = & gt; Array (2) {["key"] = & gt; String (1) "2" ["value"] = & gt; String (9) "Assigned"} [2] = & gt; Array (2) {["key"] = & gt; String (1) "3" ["value"] = & gt; String (11) "in progress"} [3] = & gt; Array (2) {["key"] = & gt; String (1) "4" ["value"] = & gt; String (9) "full"} [4] = & gt; Array (2) {["key"] = & gt; String (1) "5" ["value"] = & gt; I wanted to remove "marked" as "full...

flash - Using custom graphical assets in pure AS3 project -

I have created some button states in Flash (SCC), and I want to use them in pure AS3 project. They are movie clips with the class of neatButton_on and neatButton_off respectively, I call them like this: public class neatButton neatModule {private var stateOn: neatButton_on; Private Enmity State Off: Newbutton_off; Private var modContainer: Sprite = New Sprite (); Public Function Button () {addChild (modContainer); ModContainer.x = 200; ModContainer.y = 200; Stateof = new newbutton_off (); Stateon = new button_on (); ModContainer.addChild (stateOn); ModContainer.addChild (stateOff); ModContainer.addEventListener (MouseEvent.MOUSE_OVER, Hover); ModContainer.addEventListener (MouseEvent.MOUSE_OUT, Revoked); } Private function hover (e: MouseEvent): zero {stateOff.visible = false; } Private function unhur (e: MouseEvent): zero {stateOff.visible = true; }} My question is, is this the best way to do this? I've used assets specifically for different states of the same item, wher...