Daily Archives

Articles indexed Thursday December 13 2012

Page 7/16 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • XNA Moddable Game - Architecture Design and Reflection

    - by David K
    I've decided to embark on an XNA moddable game project of a simple rogue style. For all purposes of this question, I'm going to not be using a scripting engine, but rather allow modders to directly compile assemblies that are loaded by the game at run time. I know about the security problems this may raise. So in order to expose the moddable content, I have gone about creating a generic project in XNA called MyModel. This contains a number of interfaces that all inherit from IPlugin, such as IGameSystem, IRenderingSystem, IHud, IInputSystem etc. Then I've created another project called MyRogueModel. This references MyModel project, and holds interfaces such as IMonster, IPlayer, IDungeonGenerator, IInventorySystem. More rogue specific interfaces, but again, all interfaces in this project inherit from IPlugin. Then finally, I've created another project called MyRogueGame, that references both MyModel and MyRogueModel projects. This project will be the game that you run and play. Here I have put the actual implementation of the Monster, DungeonGenerator, InputSystem and RenderingSystem classes. This project will also scan the mods directory during run time and load any IPlugins it finds using reflection and override anything it finds from the default. For example if it finds a new implementation of the DungeonGenerator it will use that one instead. Now my question is, in order to get this far, I have effectively 2 projects that contain nothing but interfaces... which seems a little... strange ? For people to create mods for the game, I would give them both the MyModel and MyRogueModel assemblies in which they would reference. I'm not sure whether this is the right way to do it, but my reasoning goes as follows : If I write 1 input system, I can use it in any game I write. If I create 3 rogue like games, and a modder writes 1 rendering system, that modder could use the rendering system for all 3 games, because it all comes from the MyModel project. I come from a more web based C# role, so having empty interface projects doesn't seem wrong, its just something I haven't done before. Before I embark on something that might be crazy, I'd just like to know whether this is a foolish idea and whether there's a better (or established) design principle I should be following ?

    Read the article

  • Tile-based maps in AS3

    - by Ashley
    I want to make a tile-based platformer in AS3. I want my game to read an external maps file (in xml or json or somethimg similar) to draw a tile-based map. I've seen loads of tutorials for this in AS2 and other languages, and the few I've found in AS3 are either incomplete or filled with extra unnecessary features. I just want to be able to draw a basic map from sprites in Flash. Any links or information to point me in the right direction would be appreciated.

    Read the article

  • Game Timer In C++

    - by user1870398
    I need to be able to find out how many milliseconds since that last update. Is there any way I can find it out with time rather then a thread that counts like I did below? #include <iostream> #include<windows.h> #include<time.h> #include<process.h> using namespace std; int Timer = 0; int LastTimer = 0; bool End = false; void Update(int Ticks) { } void UpdateTimer() { while (true) { LastTimer = Timer; Timer++; Sleep(1); if (End) break; } } int WINAPI WinMain(HINSTANCE par1, HINSTANCE par2, LPSTR par3, int par4) { _beginthread(UpdateTimer, 0, NULL); while(true) { if (Timer == 1000) Timer = 0; Update(Timer - LastTimer); } }

    Read the article

  • Which will be faster? Switching shaders or ignore that some cases don't need full code?

    - by PolGraphic
    I have two types of 2d objects: In first case (for about 70% of objects), I need that code in the shader: float2 texCoord = input.TexCoord + textureCoord.xy But in the second case I have to use: float2 texCoord = fmod(input.TexCoord, texCoordM.xy - textureCoord.xy) + textureCoord.xy I can use second code also for first case, but it will be a little slower (fmod is useless here, input.TexCoord will be always lower than textureCoord.xy - textureCoord.xy for sure). My question is, which way will be faster: Making two independent shaders for both types of rectangles, group rectangles by types and switch shaders during rendering. Make one shader and use some if statement. Make one shader and ignore that sometimes (70% of cases) I don't need to use fmod.

    Read the article

  • WPF toolbar disappearing on resize

    - by user1122909
    On my main form I have a toolbar with a number of buttons. Once the parent form is resized down by dragging it so that the entire toolbar with all its buttons no longer fits in the width of the window, the whole toolbar disappears. Is there a way I can make it so that as you resize it, when you get to the width of the toolbar the inner controls of the form stop resizing and stay displayed, just cut off where the window has resized to? Code is <Grid > <Grid.RowDefinitions> <RowDefinition Height="Auto" /> <RowDefinition Height="Auto" /> <RowDefinition Height="*" /> <RowDefinition Height="Auto" /> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="*" /> </Grid.ColumnDefinitions> <ToolBar Grid.Row="1" Height="50" Name="tbMainToolbar" VerticalAlignment="Top" MinWidth="900" > <ToolBar.Background> <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1"> <GradientStop Color="White" Offset="0.0" /> <GradientStop Color="#DCEBFF" Offset="0.25" /> <GradientStop Color="#99CCFF" Offset="0.75" /> <GradientStop Color="#99CCFF" Offset="1.0" /> </LinearGradientBrush> </ToolBar.Background> <DockPanel LastChildFill="True"> <Button Name="btnApproved" DockPanel.Dock="Left" Click="btnToolbar_Click" CommandParameter="APPROVED" Style="{StaticResource ToolbarButtonDisplay}" HelperClasses:ButtonProperties.Image="..\..\Resources\Images\APPROVEU.GIF" Content="Approve"> </Button> ... and so forth for about 20 buttons

    Read the article

  • Space in Directory Parameter of svcutil.exe

    - by Drew Frisk
    I'm attempting to download metadata for a WCF service using svcutil but I'm running into issues with the /directory:< parameter. The directory I want to save to has a space in it: C:\Service References\Logging so when I execute /t:metadata I receive the following error: Error: The directory 'C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools\References\Logging' could not be found. Verify that the directory exists and that you have the appropriate permissions to read it. It looks to me like the space in "Service References" is causing the issue. From my understanding of command shell (which is very little) spaces act as delimiters for an executable. So I tried escaping the space with a carrot Service^ References and surrounding the path in double quotes "C:\Service References\Logging" but neither of those seem to be working, as the /directory: parameter doesn't recognize them as valid characters in the value. I haven't been able to find any direction in regards to this and svcutil, so I'm at a loss right now. I could download the files to a temp folder and then move them, but I would prefer not to take that approach. I would appreciate any direction that could be given on trying to resolve this. Thanks in advance.

    Read the article

  • Spring overloaded constructor injection

    - by noob
    This is the code : public class Triangle { private String color; private int height; public Triangle(String color,int height){ this.color = color; this.height = height; } public Triangle(int height ,String color){ this.color = color; this.height = height; } public void draw() { System.out.println("Triangle is drawn , + "color:"+color+" ,height:"+height); } } The Spring config-file is : <bean id="triangle" class="org.tester.Triangle"> <constructor-arg value="20" /> <constructor-arg value="10" /> </bean> Is there any specific rule to determine which constructor will be called by Spring ?

    Read the article

  • Permission denied to access property 'toString'

    - by Anders
    I'm trying to find a generic way of getting the name of Constructors. My goal is to create a Convention over configuration framework for KnockoutJS My idea is to iterate over all objects in the window and when I find the contructor i'm looking for then I can use the index to get the name of the contructor The code sofar (function() { constructors = {}; window.findConstructorName = function(instance) { var constructor = instance.constructor; var name = constructors[constructor]; if(name !== undefined) { return name; } var traversed = []; var nestedFind = function(root) { if(typeof root == "function" || traversed[root]) { return } traversed[root] = true; for(var index in root) { if(root[index] == constructor) { return index; } var found = nestedFind(root[index]); if(found !== undefined) { return found; } } } name = nestedFind(window); constructors[constructor] = name; return name; } })(); var MyApp = {}; MyApp.Foo = function() { }; var instance = new MyApp.Foo(); console.log(findConstructorName(instance)); The problem is that I get a Permission denied to access property 'toString' Exception, and i cant even try catch so see which object is causing the problem Fiddle http://jsfiddle.net/4ZwaV/

    Read the article

  • xsl:variable xsl:copy-of select

    - by user1901345
    I have the following XML: Picture 1 Picture 2 Picture 3 While this XSL does what is expected (output the attr of the first picture): It seems to be not possible to do the same inside the variable declaration using xsl:copy-of: Curious: If I just select "$FirstPicture" instead of "$FirstPicture/@attr" in the second example, it outputs the text node of Picture 1 as expected... Before you all suggest me to rewrite the code: This is just a simplified test, my real aim is to use a named template to select a node into the variable FirstPicture and reuse it for further selections. I hope someone could help me to understand the behavior or could suggest me a proper way to select a node with code which could be easily reused (the decission which node is the first one is complex in my real application). Thanks.

    Read the article

  • Merge Mutliple Excel Workbooks

    - by IRHM
    I wonder whether someone may be able to help me please. I'm trying to use the code below to allow the user to select multiple Excel Workbooks, amalgamating the data into one 'Summary' sheet. Sub Merge() Dim DestWB As Workbook, WB As Workbook, WS As Worksheet, SourceSheet As String Set DestWB = ActiveWorkbook SourceSheet = "Input" startrow = 7 FileNames = Application.GetOpenFilename( _ filefilter:="Excel Files (*.xls*),*.xls*", _ Title:="Select the workbooks to merge.", MultiSelect:=True) If IsArray(FileNames) = False Then If FileNames = False Then Exit Sub End If End If For n = LBound(FileNames) To UBound(FileNames) Set WB = Workbooks.Open(Filename:=FileNames(n), ReadOnly:=True) For Each WS In WB.Worksheets If WS.Name = SourceSheet Then With WS If .UsedRange.Cells.Count > 1 Then dr = DestWB.Worksheets("Input").Range("C" & Rows.Count).End(xlUp).Row + 1 lastrow = .Range("C" & Rows.Count).End(xlUp).Row For j = lastrow To startrow Step -1 Select Case .Range("E" & j).Value Case "Manager", "Lead", "Technical", "Analyst" 'do nothing Case Else .Rows(j).EntireRow.Delete End Select Next lastrow = .Range("C" & Rows.Count).End(xlUp).Row If lastrow >= startrow Then .Range("B" & startrow & ":AD" & lastrow).Copy DestWB.Worksheets("Input").Cells(dr, "B").PasteSpecial xlValues .Range("AF" & startrow & ":AQ" & lastrow).Copy DestWB.Worksheets("Input").Cells(dr, "AF").PasteSpecial xlValues .Range("AS" & startrow & ":AS" & lastrow).Copy DestWB.Worksheets("Input").Cells(dr, "AS").PasteSpecial xlValues End If End If End With Exit For End If Next WS WB.Close savechanges:=False Next n End Sub The code works fine except for one issue which I've been trying to solve for the last few weeks. The following line of code looks in column E of the Source file, and if any of the entries match the values shown in the code it copies that row of data to paste into the Destination file. If Range("E" & j) <> "Manager" And Range("E" & j) <> "Lead" And Range("E" & j) <> "Technical" And Range("E" & j) <> "Analyst" Then Rows(j).Delete The problem I have is that if none of these values are found in the Source file, I receive the following error: Run time error '1004': Delete method of range class failed and in Debug mode it highlights this part of the line as the source of the error, but I've no idea why. Rows(j).Delete I just wondered whether someone may be able to look at this please and let me know where I'm going wrong, or perhaps even suggest a more efficient process of allowing the user to merge the workbooks. Many thanks and kind regards

    Read the article

  • Visual Website Optimizer and Code Igniter

    - by absentx
    We are trying to integrate visual website optimizer into a site of ours that uses Code Igniter. The problem is when we go into the VWO control panel to look at stats and previews nothing seems to be working. In the previews panel, all of them come up as code igniter error pages that say "The URI you submitted has disallowed characters." I have researched some solutions to this and have tried changing the regex in system/config to allow more characters, all characters etc and I am still having the problem. Any known issues or problems trying to integrate VWO and Code Igniter? This definitely seems to be a url issue but I can't nail it down.

    Read the article

  • Issue with string in c#

    - by user1740381
    I have a problem with string in c#. I have following string : Here Fonts is the string array contains google fonts name : string fontsLink = "<link rel='stylesheet' id='fontrequest' href='http://fonts.googleapis.com/css?family='" + Fonts + "type='text/css' media='all'>"; this string is rendering wrong in the browser : <link rel="stylesheet" id="fontrequest" href="http://fonts.googleapis.com/css?family=" times+new+roman|offside|dangrek|days+onetype="text/css" media="all"> The problem is with the href attribute value. How can i solve this ?

    Read the article

  • Inline-SVG not rendering when generated by JS

    - by Lucas Gasenzer
    I want to implement some visual statistics into a jQuery mobile page. If I embed the folowing snippet it will show me the same results as if I would embed it from a separate *.svg-file. <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" height="115" width="100%"> <rect x="0%" y="0" fill="#8cc63f" width="19.2%" height="100" /> <text x="10%" y="115" font-family="helvetica, sans-serif" font-size="10" style="text-anchor:middle;">A</text> <text x="10%" y="15" font-family="helvetica, sans-serif" font-size="10" style="text-anchor:middle;">100</text> <rect x="20.2%" y="50" fill="#8cc63f" width="19.2%" height="50" /> <text x="30.2%" y="115" font-family="helvetica, sans-serif" font-size="10" style="text-anchor:middle;">B</text> <text x="30.2%" y="65" font-family="helvetica, sans-serif" font-size="10" style="text-anchor:middle;">50</text> <rect x="40.4%" y="90" fill="#8cc63f" width="19.2%" height="10" /> <text x="50.4%" y="115" font-family="helvetica, sans-serif" font-size="10" style="text-anchor:middle;">C</text> <text x="50.4%" y="85" font-family="helvetica, sans-serif" font-size="10" style="text-anchor:middle;">10</text> <rect x="60.6%" y="78" fill="#8cc63f" width="19.2%" height="22" /> <text x="70.6%" y="115" font-family="helvetica, sans-serif" font-size="10" style="text-anchor:middle;">D</text> <text x="70.6%" y="73" font-family="helvetica, sans-serif" font-size="10" style="text-anchor:middle;">22</text> <rect x="80.8%" y="40" fill="#8cc63f" width="19.2%" height="60" /> <text x="90.8%" y="115" font-family="helvetica, sans-serif" font-size="10" style="text-anchor:middle;">E</text> <text x="90.8%" y="55" font-family="helvetica, sans-serif" font-size="10" style="text-anchor:middle;">60</text> Now because these statistics obviously change for each site I generate code like the one above using JavaScript. The HTML-Source-Code looks the same but the SVG will not be showing. Instead it looks like this: A 100 B 50 C 10 D 22 E60 so really just a line of text Am I missing something? Thank you for your help!

    Read the article

  • issue with regex in C#

    - by Dilip
    my file is > A B C D unuse data <begin> Addd as ss 1 My name is 2323 33 text > </end> 34344 no need and my code is StringBuilder mSb = new StringBuilder(); StreamReader sr = new StreamReader(@"E:\check.txt"); String line; while (sr.ReadLine() != null) { mSb.AppendLine(sr.ReadLine()); } string matc = new Regex(@"(<begin>)(\n?.*)*</end>)?").Match(mSb.ToString()).ToString(); here it reading all file , but i just want till if i am removing ? from end , my program is crashing .. Thanks

    Read the article

  • Why is numpy c extension slow?

    - by Bitwise
    I am working on large numpy arrays, and some native numpy operations are too slow for my needs (for example simple operations such as "bitwise" A&B). I started looking into writing C extensions to try and improve performance. As a test case, I tried the example given here, implementing a simple trace calculation. I was able to get it to work, but was surprised by the performance: for a (1000,1000) numpy array, numpy.trace() was about 1000 times faster than the C extension! This happens whether I run it once or many times. Is this expected? Is the C extension overhead that bad? Any ideas how to speed things up?

    Read the article

  • Routing in Php and decorator pattern

    - by Joey Salac Hipolito
    I do not know if I am using the term 'routing' correctly, but here is the situation: I created an .htaccess file to 'process' (dunno if my term is right) the url of my application, like this : RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.+)$ index.php?url=$1 [QSA,L] Now I have this : http://appname/controller/method/parameter http://appname/$url[0]/$url[1]/$url[2] What I did is: setup a default controller, in case it is not specified in the url setup a Controller wrapper I did it like this $target = new $url[0]() $controller = new Controller($target) The problem with that one is that I can't use the methods in the object I passed in the constructor of the Controller: I resolved it like this : class Controller { protected $target; protected $view; public function __construct($target, $view) { $this->target = $target; $this->view = $view; } public function __call($method, $arguments) { if (method_exists($this->target, $method)) { return call_user_func_array(array($this->target, $method), $arguments); } } } This is working fine, the problem occurs in the index where I did the routing, here it is if(isset($url[2])){ if(method_exists($controller, $url[1])){ $controller->$url[1]($url[2]) } } else { if(method_exists($controller, $url[1])){ $controller->$url[1]() } } where $controller = new Controller($target) The problem is that the method doesn't exist, although I can use it directly without checking if method exist, how can I resolve this?

    Read the article

  • NHibernate One to One Foreign Key ON DELETE CASCADE

    - by xll
    I need to implement One-to-one association between Project and ProjecSettings using fluent NHibernate: public class ProjectMap : ClassMap<Project> { public ProjectMap() { Id(x => x.Id) .UniqueKey(MapUtils.Col<Project>(x => x.Id)) .GeneratedBy.HiLo("NHHiLoIdentity", "NextHiValue", "1000", string.Format("[EntityName] = '[{0}]'", MapUtils.Table<Project>())) .Not.Nullable(); HasOne(x => x.ProjectSettings) .PropertyRef(x => x.Project); } } public class ProjectSettingsMap : ClassMap<ProjectSettings> { public ProjectSettingsMap() { Id(x => x.Id) .UniqueKey(MapUtils.Col<ProjectSettings>(x => x.Id)) .GeneratedBy.HiLo("NHHiLoIdentity", "NextHiValue", "1000", string.Format("[EntityName] = '[{0}]'", MapUtils.Table<ProjectSettings>())); References(x => x.Project) .Column(MapUtils.Ref<ProjectSettings, Project>(p => p.Project, p => p.Id)) .Unique() .Not.Nullable(); } } This results in the following sql for Project Settings: CREATE TABLE ProjectSettings ( Id bigint PRIMARY KEY NOT NULL, Project_Project_Id bigint NOT NULL UNIQUE, /* Foreign keys */ FOREIGN KEY (Project_Project_Id) REFERENCES Project() ON DELETE NO ACTION ON UPDATE NO ACTION ); What I am trying to achieve is to have ON DELETE CASCADE for the FOREIGN KEY (Project_Project_Id), so that when the project is deleted through sql query, it's settings are deleted too. How can I achieve this ? EDIT: I know about Cascade.Delete() option, but it's not what I need. Is there any way to intercept the FK statement generation?

    Read the article

  • Overlapping template partial specialization when wanting an "override" case: how to avoid the error?

    - by user173342
    I'm dealing with a pretty simple template struct that has an enum value set by whether its 2 template parameters are the same type or not. template<typename T, typename U> struct is_same { enum { value = 0 }; }; template<typename T> struct is_same<T, T> { enum { value = 1 }; }; This is part of a library (Eigen), so I can't alter this design without breaking it. When value == 0, a static assert aborts compilation. So I have a special numerical templated class SpecialCase that can do ops with different specializations of itself. So I set up an override like this: template<typename T> struct SpecialCase { ... }; template<typename LT, typename RT> struct is_same<SpecialCase<LT>, SpecialCase<RT>> { enum { value = 1 }; }; However, this throws the error: more than one partial specialization matches the template argument list Now, I understand why. It's the case where LT == RT, which steps on the toes of is_same<T, T>. What I don't know is how to keep my SpecialCase override and get rid of the error. Is there a trick to get around this? edit: To clarify, I need all cases where LT != RT to also be considered the same (have value 1). Not just LT == RT.

    Read the article

  • Video playback with jQuery Mobile and Phonegap

    - by aritchie
    I'm fairly new to mobile apps, so am trying to knock up a simple video player using Phonegap and jQuery Mobile. The problem is, jQuery mobile appears to be blocking the video playback for some reason. To troubleshoot I stripped it right back to the following HTML, but get the same result, ie a black rectangle where the video should be, but no video playback or controls. <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta name="viewport" content="width=device-width,initial-scale=1"/> <link rel="stylesheet" type="text/css" href="css/index.css" /> <link rel="stylesheet" href="css/jquery.mobile-1.2.0.min.css" /> <script type="text/javascript" src="cordova-2.2.0.js"></script> <script type="text/javascript" src="js/index.js"></script> <script src="js/jquery-1.8.3.min.js"></script> <script src="js/jquery.mobile-1.2.0.js"></script> <title></title> </head> <body> <div> <video controls autoplay> <source src="video/video1.mp4" type="video/mp4" > </video> </div> </body> </html> If I remove the link to jquery.mobile-1.2.0.js the video shows up and plays, otherwise, just the black rectangle. I don't know jQuery mobile at all, but searching in the js for a reference to the video elements doesn't show up, so I've no idea what is blocking it. The code works fine in Chrome and Firefox. There are no console messages in Xcode. I also tried hooking up to http://debug.phonegap.com/ but this gave no error messages either. Any ideas??

    Read the article

  • sqlite select query round of double value

    - by Scorpion
    I have stored location in my sqlite database. CREATE TABLE city ( latitude NUMERIC, longitude NUMERIC ) Below are the value :- latitude = 41.0776605;//actual value in db - NUMERIC stored as DB longitude = -74.170086;//actual value in db - NUMERIC stored as DB final String query = "SELECT * FROM city"; cursor = myDataBase.rawQuery(query, null); if (null != cursor) { while (cursor.moveToNext()) { Log.i(TAG, "Latitude == " + cursor.getDouble(cursor.getColumnIndex("latitude"))); Log.i(TAG, "Longitude == " + cursor.getDouble(cursor.getColumnIndex("longitude"))); } } Result :- Latitude = 40.4127 Longitude = -74.25252 I don't want round off this values. Is there any way to solve this problem.

    Read the article

  • NOT LIKE not working on comparison to a column

    - by rodling
    Data is fairly large and takes few minutes to run it every time, so its taking a lot of time debugging this problem. When I run like concat('%',T.item,'%') on smaller data it seems to identify items properly. However, when I run it on the main DB (the code shown), it still shows many(maybe even all) of the exceptions. EDIT: it seems when i add NOT it stops identifying items select distinct T.comment from (select comment, source, item from data, non_informative where ticker != "O" and source != 7 and source != 6) as T where T.comment not like concat('%',T.item,'%') order by T.comment; comment and source are in data, item is in non_informative Some items from T.item: 'Stock Analysis -', '#InsideTrades', 'IIROC Trade' Example comment which should be removed '#InsideTrades #4 | MACNAB CRAIG (Director,Officer,Chief Executive Officer): Filed Form 4 for $NNN (NATIONAL RETA' Can't seem to figure out it why shows all the items

    Read the article

  • OsmDroid show blank screen with blocks

    - by Lennie
    Am trying to use OsmDroid with MapQuest maps downloaded from Mobile Atlas Creator. I followed all the instructions to generate the map tiles, upload them to the SDcard etc but when I run this on the device I get a screen with a bunch of empty boxes... What am I doing wrong? > @Override > public void onCreate(Bundle savedInstanceState) { > super.onCreate(savedInstanceState); > setContentView(R.layout.osm_map); > mapView = (MapView) findViewById(R.id.mapview); > mapView.setTileSource(TileSourceFactory.MAPQUESTOSM); > mapView.setBuiltInZoomControls(true); > mapView.setUseDataConnection(false); > mapController = mapView.getController(); > mapController.setZoom(15); > } > protected boolean isRouteDisplayed() { > // TODO Auto-generated method stub > return false; > }

    Read the article

  • Pure CSS3 show/hide full height div with transition

    - by user1898838
    Dear Stackoverflow readers, I've been breaking my head over something I've seen at Tympanus, and I can't figure out how to properly do such a thing. In this link: http://tympanus.net/Tutorials/FullscreenBookBlock/ you can see that the menu is completely hidden, and only visible when you click on an icon. It has a lovely transition, and it basically roughly sums up what I'm trying to accomplish. The only difference with the above example is that I don't want to completely hide this full-height element, and I'd like to accomplish the above effect with a hover instead of having to click a button. So in an ideal world you'd see a vertical bar, and when you hover over that bar (or click on it with your finger if you're on a tablet), it "opens up" and shows you the full content inside the opened div. Now, I can make a decent bit in html5 and css3, but the above explained effect that I'm trying to accomplish has given me serious headaches, hehe. Does anyone happen to know a tutorial I might have missed that does this exact thing? p.s.: I have tried to take apart Tympanus' html/css, but with the page-fold effect that's also implemented in it I can't seem to figure it out, hence my hope for someone here to help me on my way :)

    Read the article

  • Formatting a query to enumerate through 2 different datatables

    - by boiler1974
    I have 2 datatables sendTable and recvTable They both have identical column names and numbers of columns "NODE" "DSP Name" "BUS" "IDENT" "STATION" "REF1" "REF2" "REF3" "REF4" "REF5" "REF6" "REF7" "REF8" I need to compare these 2 tables and separate out the mismatches I only need to check Columns 3-11 and Ignore col 1 and 2 I tried at first removing the 2 columns and then loop thru row by row and return matches and mismatches but the problem with this approach is that I no longer have the "NODE" and "DSP Name" associated with the row when I finalize my results So I need help with a query Here is my attempt var samerecordQuery = from r1 in sendTable.AsEnumerable() where r1.Field<int>("BUS").Equals(from r2 in recvTable.AsEnumerable() where r2.Field<int>("BUS")) this obviously doesn't work so how do I format the query to say from r1 cols[3-11] equals r2 cols [3-11] and once I have this I can use the except to pull out the mismatches

    Read the article

  • GAE datastore querying integer fields

    - by ParanoidAndroid
    I notice strange behavior when querying the GAE datastore. Under certain circumstances Filter does not work for integer fields. The following java code reproduces the problem: log.info("start experiment"); DatastoreService datastore = DatastoreServiceFactory.getDatastoreService(); int val = 777; // create and store the first entity. Entity testEntity1 = new Entity(KeyFactory.createKey("Test", "entity1")); Object value = new Integer(val); testEntity1.setProperty("field", value); datastore.put(testEntity1); // create the second entity by using BeanUtils. Test test2 = new Test(); // just a regular bean with an int field test2.setField(val); Entity testEntity2 = new Entity(KeyFactory.createKey("Test", "entity2")); Map<String, Object> description = BeanUtilsBean.getInstance().describe(test2); for(Entry<String,Object> entry:description.entrySet()){ testEntity2.setProperty(entry.getKey(), entry.getValue()); } datastore.put(testEntity2); // now try to retrieve the entities from the database... Filter equalFilter = new FilterPredicate("field", FilterOperator.EQUAL, val); Query q = new Query("Test").setFilter(equalFilter); Iterator<Entity> iter = datastore.prepare(q).asIterator(); while (iter.hasNext()) { log.info("found entity: " + iter.next().getKey()); } log.info("experiment finished"); the log looks like this: INFO: start experiment INFO: found entity: Test("entity1") INFO: experiment finished For some reason it only finds the first entity even though both entities are actually stored in the datastore and both 'field' values are 777 (I see it in the Datastore Viewer)! Why does it matter how the entity is created? I would like to use BeanUtils, because it is convenient. The same problem occurs on the local devserver and when deployed to GAE.

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >