Search Results

Search found 11277 results on 452 pages for 'jeff certain'.

Page 40/452 | < Previous Page | 36 37 38 39 40 41 42 43 44 45 46 47  | Next Page >

  • Which CMS do I need? Needs to be easy to post a certain kind of post

    - by Vian Esterhuizen
    Hi, I'm creating a site for a video store and it needs to be CMS. I'm doing this for free so I need to use a free CMS like Wordpress, Drupal or Joomla. Do I need a new CMS, a plugin or some PHP of my own? What I need: User accounts Categories Custom post Here's the site as it stands with WP: http://sundancevideo.ca. Right now an experimental site to try to work this out. What I've done now, is created a "Draft" that includes a template table with images and text and so on. The user would then have to copy everything, past into a new post and replace necessary. This really isn't working well. As you may notice by the condition of the posts. What I would prefer is if it was integrated into the WP UI. Like a field for "Description" and field for "Image" where they can upload the images as necessary. This would then generate post, with a table including all the information and images, for as many movies that were added in the UI. Please ask if I'm not being clear. Please help, any suggestions are welcome. Thank you, Vian

    Read the article

  • How to stop OpenGL from applying blending to certain content? (see pics)

    - by RexOnRoids
    Supporting Info: I use cocos2d to draw a sprite (graph background) on the screen (z:-1). I then use cocos2d to draw lines/points (z:0) on top of the background -- and make some calls to OpenGL blending functions before the drawing to SMOOTH out the lines. Problem: The problem is that: aside from producing smooth lines/points, calling these OpenGL blending functions seems to "degrade" the underlying sprite (graph background). As you can see from the images below, the "degraded" background seems to be made darker and less sharp in Case 2. So there is a tradeoff: I can either have (Case 1) a nice background and choppy lines/points, or I can have (Case 2) nice smooth lines/points and a degraded background. But obviously I need both. THE QUESTION: How do I set OpenGL so as to only apply the blending to the layer with the Lines/Points in it and thus leave the background alone? The Code: I have included code of the draw() method of the CCLayer for both cases explained above. As you can see, the code producing the difference between Case 1 and Case 2 seems to be 1 or 2 lines involving OpenGL Blending. Case 1 -- MainScene.h (CCLayer): -(void)draw{ int lastPointX = 0; int lastPointY = 0; GLfloat colorMAX = 255.0f; GLfloat valR; GLfloat valG; GLfloat valB; if([self.myGraphManager ready]){ valR = (255.0f/colorMAX)*1.0f; valG = (255.0f/colorMAX)*1.0f; valB = (255.0f/colorMAX)*1.0f; NSEnumerator *enumerator = [[self.myGraphManager.currentCanvas graphPoints] objectEnumerator]; GraphPoint* object; while ((object = [enumerator nextObject])) { if(object.filled){ /*Commenting out the following two lines induces a problem of making it impossible to have smooth lines/points, but has merit in that it does not degrade the background sprite.*/ //glEnable (GL_BLEND); //glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glHint (GL_LINE_SMOOTH_HINT, GL_DONT_CARE); glEnable (GL_LINE_SMOOTH); glLineWidth(1.5f); glColor4f(valR, valG, valB, 1.0); ccDrawLine(ccp(lastPointX, lastPointY), ccp(object.position.x, object.position.y)); lastPointX = object.position.x; lastPointY = object.position.y; glPointSize(3.0f); glEnable(GL_POINT_SMOOTH); glHint(GL_POINT_SMOOTH_HINT, GL_NICEST); ccDrawPoint(ccp(lastPointX, lastPointY)); } } } } Case 2 -- MainScene.h (CCLayer): -(void)draw{ int lastPointX = 0; int lastPointY = 0; GLfloat colorMAX = 255.0f; GLfloat valR; GLfloat valG; GLfloat valB; if([self.myGraphManager ready]){ valR = (255.0f/colorMAX)*1.0f; valG = (255.0f/colorMAX)*1.0f; valB = (255.0f/colorMAX)*1.0f; NSEnumerator *enumerator = [[self.myGraphManager.currentCanvas graphPoints] objectEnumerator]; GraphPoint* object; while ((object = [enumerator nextObject])) { if(object.filled){ /*Enabling the following two lines gives nice smooth lines/points, but has a problem in that it degrades the background sprite.*/ glEnable (GL_BLEND); glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glHint (GL_LINE_SMOOTH_HINT, GL_DONT_CARE); glEnable (GL_LINE_SMOOTH); glLineWidth(1.5f); glColor4f(valR, valG, valB, 1.0); ccDrawLine(ccp(lastPointX, lastPointY), ccp(object.position.x, object.position.y)); lastPointX = object.position.x; lastPointY = object.position.y; glPointSize(3.0f); glEnable(GL_POINT_SMOOTH); glHint(GL_POINT_SMOOTH_HINT, GL_NICEST); ccDrawPoint(ccp(lastPointX, lastPointY)); } } } }

    Read the article

  • Refactor throwing not null exception if using a method that has a dependency on a certain contructor

    - by N00b
    In the method below the second constructor accepts a ForumThread object which the IncrementViewCount() method uses. There is a dependency between the method and that particular constructor. Without extracting into a new private method the null check in IncrementViewCount() and LockForumThread() (plus other methods not shown) is there some simpler re-factoring I can do or the implementation of a better design practice for this method to guard against the use of the wrong constructor with these dependent methods? Thank you for any suggestions in advance. private readonly IThread _forumLogic; private readonly ForumThread _ft; public ThreadLogic(IThread forumLogic) : this(forumLogic, null) { } public ThreadLogic(IThread forumLogic, ForumThread ft) { _forumLogic = forumLogic; _ft = ft; } public void Create(ForumThread ft) { _forumLogic.SaveThread(ft); } public void IncrementViewCount() { if (_ft == null) throw new NoNullAllowedException("_ft ForumThread is null; this must be set in the constructor"); lock (_ft) { _ft.ViewCount = _ft.ViewCount + 1; _forumLogic.SaveThread(_ft); } } public void LockForumThread() { if (_ft == null) throw new NoNullAllowedException("_ft ForumThread is null; this must be set in the constructor"); _ft.ThreadLocked = true; _forumLogic.SaveThread(_ft); }

    Read the article

  • Rspec Selenium. Test to check certain Ajax functions passes when i expect it to fail.

    - by alokswain
    I am testing a Ajax action using Rspec and Selenium. My story is as follows: it "should create a new User with any input" do @browser.open "/people" @browser.wait_for_page_to_load "2000" @browser.type "user_name", "Alok Swain" @browser.click "user_submit" @browser.text?("Alok Swain").should be_true end The action i am testing is: def add_user @users = User.all User.create(params[:user]) render :update do |page| page.alert "Created User" page.replace_html "users", :partial => '/people/users_list', :locals => {:users => @users} end end The test fails and the error I get is: 'User should create a new User with any input' FAILED expected false to be true. This test should pass right ? I also kept an alert and tried @browser.is_alert_present.should be_true but i got the same error. I tried @browser.is_text_present("test") and this test succeeded. In the test database a record was created for Alok Swain but when I tried the above assertion it passed when i expected it to fail. Is there any thing else to be done here. What am I missing ?

    Read the article

  • Query XML file with PHP to return certain bookmarks...

    - by josh brown
    I have an XML file full of bookmarks from Google Bookmarks. (File: http://gist.github.com/324844) I want to pull the bookmark based on this path: xml_api_reply-bookmarks-bookmark-labels-label. So, my question is How can I use SimpleXML to grab the bookmarks that have the label Inspiration? Some bookmarks may have more than one bookmark.

    Read the article

  • Why do LINQ to Entities does not recognize certain Methods?

    - by Luiscencio
    Why cant I do this: usuariosEntities usersDB = new usuariosEntities(); foreach (DataGridViewRow user in dgvUsuarios.Rows) { var rowtoupdate = usersDB.usuarios.Where( u => u.codigo_usuario == Convert.ToInt32(user.Cells[0].Value) ).First(); rowtoupdate.password = user.Cells[3].Value.ToString(); } usersDB.SaveChanges(); And have to do this: usuariosEntities usersDB = new usuariosEntities(); foreach (DataGridViewRow user in dgvUsuarios.Rows) { int usercode = Convert.ToInt32(user.Cells[0].Value); var rowtoupdate = usersDB.usuarios.Where(u => u.codigo_usuario == usercode).First(); rowtoupdate.password = user.Cells[3].Value.ToString(); } usersDB.SaveChanges(); I must admint it is a more readable code but why cant this be done?

    Read the article

  • Is there a way to only backup a SQL 2005 database structure fully, but only the data in a certain se

    - by TheSoftwareJedi
    I have several schemas in my database, and the largest one ("large" meaning disk space consumed) is my "web" schema which is a denormalized copy of data in the operational schemas. This denormalized data is able to be reconstructed at anytime, and is merely there for extremely fast read purposes. Since the data is redundant, and VERY large - I'd like to exclude it from being backed up. I already have stored procedures that can regenerate all of the data in that schema in a couple of hours - for use in the event of a failure. I assume I can split the tables in this schema out to another data file or such (ideally even on another drive for faster reads), but is there a way to never have that data file backup, yet still in the event of a failure its structure could be restored (and other DDL stuff like procs, views, etc)? Somewhat related, can I also have these tables not do transaction logging, if I go to "Full" backup mode for the rest of the database?

    Read the article

  • Using java.util.logging, is it possible to restart logs after a certain period of time?

    - by Fry
    I have some java code that will be running as an importer for data for a much larger project. The initial logging code was done with the java.util.logging classes, so I'd like to keep it if possible, but it seems to be a little inadequate now given he amount of data passing through the importer. Often times in the system, the importer will get data that the main system doesn't have information for or doesn't match the system's data so it is ignored but a message is written to the log about what information was dropped and why it wasn't imported. The problem is that this tends to grow in size very quickly, so we'd like to be able to start a fresh log daily or weekly. Does anybody have an idea if this can be done in the logging classes or would I have to switch to log4j or custom? Thanks for any help!

    Read the article

  • how do I detect OS X in my .vimrc file, so certain configurations will only apply to OS X?

    - by Brandon
    I use my .vimrc file on my laptop (OS X) and several servers (Solaris & Linux), and could hypothetically someday use it on a Windows box. I know how to detect unix generally, and windows, but how do I detect OS X? (And for that matter, is there a way to distinguish between Linux and Solaris, etc. And is there a list somewhere of all the strings that 'has' can take? My Google-fu turned up nothing.) For instance, I'd use something like this: if has("mac") " open a file in TextMate from vi: " nmap mate :w<CR>:!mate %<CR> elseif has("unix") " do stuff under linux and " elseif has("win32") " do stuff under windows " endif But clearly "mac" is not the right string, nor are any of the others I tried.

    Read the article

  • Can I join two tables whereby the joined table is sorted by a certain column?

    - by Ferdy
    I'm not much of a database guru so I need some help on a query I'm working on. In my photo community project I want to richly visualize tags by not only showing the tag name and counter (# of images inside them), I also want to show a thumb of the most popular image inside the tag (most karma). The table setup is as follow: Image table holds basic image metadata, important is the karma field Imagefile table holds multiple entries per image, one for each format Tag table holds tag definitions Tag_map table maps tags to images In my usual trial and error query authoring I have come this far: SELECT * FROM (SELECT tag.name, tag.id, COUNT(tag_map.tag_id) as cnt FROM tag INNER JOIN tag_map ON (tag.id = tag_map.tag_id) INNER JOIN image ON tag_map.image_id = image.id INNER JOIN imagefile on image.id = imagefile.image_id WHERE imagefile.type = 'smallthumb' GROUP BY tag.name ORDER BY cnt DESC) as T1 WHERE cnt > 0 ORDER BY cnt DESC [column clause of inner query snipped for the sake of simplicity] This query gives me somewhat what I need. The outer query makes sure that only tags are returned for which there is at least 1 image. The inner query returns the tag details, such as its name, count (# of images) and the thumb. In addition, I can sort the inner query as I want (by most images, alphabetically, most recent, etc) So far so good. The problem however is that this query does not match the most popular image (most karma) of the tag, it seems to always take the most recent one in the tag. How can I make sure that the most popular image is matched with the tag?

    Read the article

  • is there any way we can disable on mouse over event on certain columns of an data grid

    - by prince23
    hi, here wat i am trying to do is that on mouse over of first column i need to hit mouse MouseEnter event and show the pop up which i have kept there rest all other column i dnt need to to show the pop up so i am having this fuction there MouseLeave="Row_MouseLeave" <sdk:DataGrid MinHeight="100" x:Name="dgCounty" AutoGenerateColumns="False" VerticalAlignment="Top" Grid.Row="1" IsReadOnly="True" Margin="5,5,5,0" RowDetailsVisibilityChanged="dgCounty_RowDetailsVisibilityChanged" SelectionMode="Extended" RowDetailsVisibilityMode="VisibleWhenSelected" MouseEnter="dgCounty_MouseEnter" MouseLeave="dgCounty_MouseLeave" SelectionChanged="dgCounty_SelectionChanged" LoadingRow="dgCounty_LoadingRow1" UnloadingRow="dgCounty_UnloadingRow"> <sdk:DataGrid.Columns> <sdk:DataGridTemplateColumn> <sdk:DataGridTemplateColumn.CellTemplate> <DataTemplate> <Button x:Name="myButton" Width="24" Height="24" Click="Details_Click"> <Image x:Name="img" Source="Images/detail.JPG" Stretch="None"/> </Button> </DataTemplate> </sdk:DataGridTemplateColumn.CellTemplate> </sdk:DataGridTemplateColumn> <sdk:DataGridTemplateColumn Header="ID"> <sdk:DataGridTemplateColumn.CellTemplate> <DataTemplate > <sdk:Label Content="{Binding EmployeeID}" /> </DataTemplate> </sdk:DataGridTemplateColumn.CellTemplate> </sdk:DataGridTemplateColumn> <sdk:DataGridTemplateColumn Header="Name"> <sdk:DataGridTemplateColumn.CellTemplate> <DataTemplate > <sdk:Label Content="{Binding EmployeeFName}" MouseLeave="Row_MouseLeave" /> </DataTemplate> </sdk:DataGridTemplateColumn.CellTemplate> </sdk:DataGridTemplateColumn> <sdk:DataGridTemplateColumn Header="MailID"> <sdk:DataGridTemplateColumn.CellTemplate> <DataTemplate > <sdk:Label Content="{Binding EmployeeMailID}" MouseLeave="Row_MouseLeave" /> </DataTemplate> </sdk:DataGridTemplateColumn.CellTemplate> </sdk:DataGridTemplateColumn> </sdk:DataGrid.Columns> </sdk:DataGrid> in code behind void Row_MouseLeave(object sender, MouseEventArgs e) { Show.Visibility = Visibility.Collapsed; PoPGrid.Visibility = Visibility.Collapsed; } void Row_MouseEnter(object sender, MouseEventArgs e) { } the pop up her is like the ajax modal pop up wat we do in asp.net i am able to show data in pop up now the main issue is i need to show pop up only on the 2 column. rest all other column i need to hide the pop up when i move mouse over on that column. i am trying this concept it is not working is there any way i can achive it as i said only need to show pop up on mouse over of the 2 column thanks in advance prince

    Read the article

  • Is there any way to filter certain things in pages served by IIS?

    - by Ruslan
    Hello, This is my first time posting here so please keep that in mind... I'll try to be short and get right to defining the problem. We have an ASP.NET 2 application (eCommerce package) running on IIS (Windows Server 2003). The main site's page(s) are using plain HTTP (no SSL), but the whole checkout process and the shopping cart page is using SSL (HTTPS). Now, the problem is that the site's header is located in a template file, and inside it it has a plain HTML 'img' tag calling an image with the "http://" portion hard-coded into it... This header appears on absolutely every page (including the https pages), and due to its insecure image tag, a warning box pops up in IE on every stage of the checkout process... Now, the problem: The live application cannot be touched in any way (no changes can be made to the template (so simply changing "http://" to "//" is not an option), IIS cannot be restarted, and the website/app pool cannot be restarted). Is there any way in the world (maybe plugin for IIS or a setting somewhere) that I can filter the pages right before they are served to replace the '<img src="http://example.com/image.jpg">' with '<img src="//example.com/image.jpg">' in the final HTML? Possibly via a regular expression or something? Thanks to everybody in advance.

    Read the article

  • Dynamically removing records when certain columns = 0; data cleansing

    - by cdburgess
    I have a simple card table: CREATE TABLE `users_individual_cards` ( `id` int(11) NOT NULL AUTO_INCREMENT, `user_id` char(36) NOT NULL, `individual_card_id` int(11) NOT NULL, `own` int(10) unsigned NOT NULL, `want` int(10) unsigned NOT NULL, `trade` int(10) unsigned NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `user_id` (`user_id`,`individual_card_id`), KEY `user_id_2` (`user_id`), KEY `individual_card_id` (`individual_card_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1; I have ajax to add and remove the records based on OWN, WANT, and TRADE. However, if the user removes all of the OWN, WANT, and TRADE cards, they go to zero but it will leave the record in the database. I would prefer to have the record removed. Is checking after each "update" to see if all the columns = 0 the only way to do this? Or can I set a conditional trigger with something like: //psuedo sql AFTER update IF (OWN = 0, WANT = 0, TRADE = 0) DELETE What is the best way to do this? Can you help with the syntax?

    Read the article

  • Entity framework (3.5): How to translate a certain LINQ query to eSQL?

    - by Sebastian P.R. Gingter
    Hi there, I have the following LINQ query that I need to translate to Entity SQL /eSQL): return (ObjectQuery<User>) from user in Users where !user.Roles.Any(r => r.AnIntegerProperty < 0) select user; User.Roles is an navigation property to the n:m relation to Roles and there also is a Role.Users navigation property the other way round. There aren't User_Roles or Roles_User Entities available in the model, and I can't add these. I also can't use the LINQ statement here, because I need to add .OrderBy("it." + propertyname) (comes from another source, can't change that too) later on which is not possible if the ObjectQuery is build with linq. So how do I translate this to eSQL? And where can I find good eSQL samples? I searched for a whole day until now and must admit that eSQL reference is lousy and there aren't any usable examples around the web.

    Read the article

  • Restart program from a certain line with an if statement?

    - by user1744093
    could anyone help me restart my program from line 46 if the user enters 1 (just after the comment where it states that the next code is going to ask the user for 2 inputs) and if the user enters -1 end it. I cannot think how to do it. I'm new to C# any help you could give would be great! class Program { static void Main(string[] args) { //Displays data in correct Format List<float> inputList = new List<float>(); TextReader tr = new StreamReader("c:/users/tom/documents/visual studio 2010/Projects/DistanceCalculator3/DistanceCalculator3/TextFile1.txt"); String input = Convert.ToString(tr.ReadToEnd()); String[] items = input.Split(','); Console.WriteLine("Point Latitude Longtitude Elevation"); for (int i = 0; i < items.Length; i++) { if (i % 3 == 0) { Console.Write((i / 3) + "\t\t"); } Console.Write(items[i]); Console.Write("\t\t"); if (((i - 2) % 3) == 0) { Console.WriteLine(); } } Console.WriteLine(); Console.WriteLine(); // Ask for two inputs from the user which is then converted into 6 floats and transfered in class Coordinates Console.WriteLine("Please enter the two points that you wish to know the distance between:"); string point = Console.ReadLine(); string[] pointInput = point.Split(' '); int pointNumber = Convert.ToInt16(pointInput[0]); int pointNumber2 = Convert.ToInt16(pointInput[1]); Coordinates distance = new Coordinates(); distance.latitude = (Convert.ToDouble(items[pointNumber * 3])); distance.longtitude = (Convert.ToDouble(items[(pointNumber * 3) + 1])); distance.elevation = (Convert.ToDouble(items[(pointNumber * 3) + 2])); distance.latitude2 = (Convert.ToDouble(items[pointNumber2 * 3])); distance.longtitude2 = (Convert.ToDouble(items[(pointNumber2 * 3) + 1])); distance.elevation2 = (Convert.ToDouble(items[(pointNumber2 * 3) + 2])); //Calculate the distance between two points const double PIx = 3.141592653589793; const double RADIO = 6371; double dlat = ((distance.latitude2) * (PIx / 180)) - ((distance.latitude) * (PIx / 180)); double dlon = ((distance.longtitude2) * (PIx / 180)) - ((distance.longtitude) * (PIx / 180)); double a = (Math.Sin(dlat / 2) * Math.Sin(dlat / 2)) + Math.Cos((distance.latitude) * (PIx / 180)) * Math.Cos((distance.latitude2) * (PIx / 180)) * (Math.Sin(dlon / 2) * Math.Sin(dlon / 2)); double angle = 2 * Math.Atan2(Math.Sqrt(a), Math.Sqrt(1 - a)); double ultimateDistance = (angle * RADIO); Console.WriteLine("The distance between your two points is..."); Console.WriteLine(ultimateDistance); //Repeat the program if the user enters 1, end the program if the user enters -1 Console.WriteLine("If you wish to calculate another distance type 1 and return, if you wish to end the program, type -1."); Console.ReadLine(); if (Convert.ToInt16(Console.ReadLine()) == 1); { //here is where I need it to repeat }

    Read the article

  • how to get items that hasnot got a certain class in jquery?

    - by manraj82
    <ul id ='caseStudies'> <li class="humor crime fantasy hidden"> A </li> <li class="crime"> B </li> <li class="humor crime hidden"> C </li> <li class="humor crime"> D </li> <li class="humor crime fantasy action hidden"> E </li> <li class="fantasy action"> F </li> <li class="humor fantasy"> G </li> <li class="crime action hidden"> H </li> </ul> $('ul#caseStudies li.hidden').each(function() { }//this will get all the LI in the UL that has got class 'hidden' But how do i get all the LI in the UL that hasn got a class 'hidden'?

    Read the article

  • Getting all objects with a certain element inside a collection of strings with criteria API.

    - by Jens Jansson
    Hey. I'm trying to build a Hibernate Criteria query to find entities that have a specific element inside a collection. We can take as an example a Book -object that looks like this: public class Book { private Long id; private String title; private Set<String> authors = new HashSet<String>(); } The entity is mapped like this: <class name="Book" table="Book"> <id name="id" column="BOOK_ID"> <generator class="native"/> </id> <property name="title"/> <set name="authors" table="Book_Authors"> <key column="BOOK_ID"/> <element type="string" column="AUTHORS"/> </set> </class> Now I would like to find out which books are written by Matt. With pure SQL I can do a query like this: String author = "Matt"; String query = "SELECT * FROM Book " + "WHERE BOOK_ID IN " + "(SELECT BOOK_ID FROM Book_Authors " + "WHERE authors = :author )"; List<Book> result = session.createSQLQuery(query) .addEntity(Book.class) .setParameter("author", author) .list(); This works all good and well, and I get out all books that Matt has been a part of writing. The project I work in, however, uses the Criteria API instead of raw SQL, and I haven't found a way to express the same query in that form. I've taken a look on the Restrictions API and the closest I've found is Restions.in(propertyName, collection) but that works the other way around (one value in object, many values to match against). Any ideas?

    Read the article

< Previous Page | 36 37 38 39 40 41 42 43 44 45 46 47  | Next Page >