w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Three layers of culture specific resource files
I'm not pointing out a solution for your problem, but I have, however, a concern about your string-formatting: One problem with your example is the use of String.Format with translations. The "Add your {0}" part will, in some languages, requre different wordings depending on, what will be inserted into the {0} part. An example: "Add you horse" will, translated into Danish, become "Tilføj din hest" whereas "Add your donkey" will translate into "Tilføj dit æsel". So as you can see there is a difference: din/dit which will not be translateable correctly from "Add your {0}". The same goes for other languags such as german. Edit: A pseudo-answer could be something like: Add more strings to each resx-file (with identifiers like AddYourItemHorse, AddYourItemRacecar and AddYourItemDonkey

Categories : C#

Which files from phpexcel library are necessary to export data into excel2007 format ? I want minimum number of files
If you absolutely have to do this: Remove all locale files except those in the /en subdirectory. Remove all named Readers and Writers and associated subdirectories except those you need (you still need the Abstracts and the Interfaces though). Remove all CachedObjectStorage options except Memory/Icache/CacheBase. Remove Charts if you don't use them. Remove Shared PCLZip, OLE files and Escher.... and hope that I've not miscalculated

Categories : PHP

git export plus non-commited files
You could try copying all directories/files in your folder except for the .git directory. See option 1 in this answer to GIT - copy newest branch to another directory.

Categories : GIT

Export more .swf Files with AS3 Code
Instead of having 200 swf files, maybe you should try having only one swf file, and use a Flashvar to define which text you want to display. Here is a quick sample on how to do this, and how to use this. In the Flash code, you'll have something like that : // var myTextField:TextField; // in this sample, I want to set the content of myTextField // here, I am using an Object as an associative Array. Thus, I can do textTable[''] to obtain 'text sample 1' var textTable:Object = { label1 : "text sample 1", label2 : "foo bar", showError : "some error occured", pizza : "I love pizza" // [...] } // I'm fetching the flashvars in params, and then specifically the content of the labelKey Flashvar. var params:Object = LoaderInfo(this.root.loaderInfo).parameters; var key:String = params.

Categories : Actionscript

spec test export csv files
FWIW -- looking at a method afterward and trying to come up with a spec leads to frustration, guilt, and binges. If you were to create this using TDD, it would be broken up into small methods that were easy to verify. Hint: break up your code into small methods. test those methods.

Categories : Ruby On Rails

I want to export the name of multiple matlab files into a .csv
To get your filename, load the files using dir command, read them individually in your for loop, and then write them to file. (I think I already posted something like this?) Here is the prototype: files = dir('*.mat'); % obtain all files with .mat extenstion fid = fopen('result.csv','a'); for k = 1:length(data) filename = files(k).name; % get the filename fprintf(fid, '%s, ', filename); end fid = fclose(fid); Unfortunately, you cannot just save the file names as strings in a cell and write it as you might a matrix using say csvwrite, so you can just do this.

Categories : Excel

Use Mongoexport to export a collection in multiple files
Depending on the data in your collection, one possible solution might be to use the --query <JSON>, -q <JSON> flag to create several files. (Documentation here.) For example, if your collection stores college student documents, e.g.: { _id: ObjectId("5237258211f41a0c647c47b1"), name: "Jane Doe", age: 19, grade: "sophomore" }, { _id: ObjectId("5237258211f41a0c647c47b2"), name: "John Smith", age: 20, grade: "junior" }, ... You might, for example, decide to query on grade, running mongoexport four times to create four files (freshman, sophomore, junior, senior). If each file was under 16mb, this would solve your problem. If this doesn't answer your question, please provide the commands you're using to import and export. :)

Categories : Mongodb

Powershell: Search data in *.txt files to export into *.csv
I think this is the kind of thing you need, I've changed Select-String to not use the -quiet option, this will return a matches object, one of the properties of this is the line I then split the line on the ':' and trim any spaces. These results are then placed into a new PSObject which in turn is added to an array. The array is then put back on the pipeline at the end. I also moved the call to get-content to avoid reading each file more than once. # Create an array for results $results = @() # Loop through the project directory Foreach ($file In $files) { # load the content once $content = Get-Content $file.FullName # Check all keywords ForEach ($control In $controls) { # find the line containing the control string $result = $content |

Categories : Powershell

Is there any ways that I can export only the changed files in one commit in git?
Not sure what the question is exactly about. Maybe you are looking for: git log --name-only In git there is no "download". You only clone a complete repository and fetch new commits afterwards. Once you have a local clone of the repository you are able access all files ever created in that repository. If you want the content of a file in a given commit you can say something like: git show a90b68ab485d795d3fb1f5220eb7851b21583ccd:sources/host-tools/gdb-pretty-printers/stlport/gppfs-0.2/COPYING

Categories : GIT

Export changed files & folders from multiple commit
The only commands which comes close would be git archive, for which you can specify a list of path you want to export in a (zip or tar) archive, you could un-archive elsewhere. But that isn't a convenient way to get only the files you need. The other way would be to: clone your local repo delete all the files not listed your git diff output Actually, an easier way would be to copy each file from the git diff with their path. See "linux: copy and create destination dir if it does not exist" cp --parents a/b/c existing_dir copies the file 'a/b/c' to 'existing_dir/a/b/c', creating any missing intermediate directories.

Categories : GIT

Views Data Export for Larger Files fails
If it is not a problem you can break the view results with a pager (for example of 1000 rows) and export the results for each page. This will reduce the memory requirements as also as the excel file size.

Categories : PHP

How to test controllers import/export csv files actions in rspec?
The most efficient way to test this functionality, would be unit testing the classes that imports/exports the csv data, then testing the controller calls for this classes, and its response formats.

Categories : Ruby On Rails

export ssrs report data into multiple excel files
AFAIK there is no feature in SSRS that handles this. You will have to roll your own solution: generate the report asynchronosly (or scheduled) server side, then create an application to distribute the files in seperate parts.

Categories : Reporting Services

Batch export text files based on ID values of a data frame using R
You can use lapply to achieve that but I prefer plyr::l_ply require(plyr) save_df <- function(index) { write.table(subset(df2, I == index), file = file.path("Users", paste0("Idx", index, ".txt")), row.names = FALSE) } l_ply(df2$I, save_df)

Categories : R

essbase: How can i export without double quotes in data files using dataexport commands in MaxL?
There is no option that I am aware of to turn this off. You want the quotes because it's possible to have a comma in a member name – if there were no quotes then member names with commas would really mess up the data load. The question you should be asking yourself is seeing if the tool consuming the data file can work with the quotes. Most CSV readers handle this. If you really, really, really need to get rid of the double quotes then you might try using a stream editor like sed or even tr to remove them. If you find this answer helpful please indicate as such so that more people are encouraged to answer Essbase questions!

Categories : Misc

Why are my Orchard CMS widgets not populating the Id property when I export them through with Import/Export module?
Turns out that I needed to add the IdentityPart to be attached to my widgets. You can do this in your migrations file by using ContentDefinitionManager.AlterTypeDefinition("MyWidget", cfg => cfg .WithPart("IdentityPart"));

Categories : C#

XCode export archive is missing "export as application"
I just checked my version of Xcode to make sure and with Version 4.6.3 (4H1503) of Xcode I see the same screen as in the video with or without code signing turned on. I would make sure you have the most current version of Xcode, clean your build folder and try to Archive again. If that doesn't work I would delete Xcode and reinstall it from the App Store. The other option is to create another user account on your machine and try archiving and distributing from there to see if it is any different (I actually had a problem related to provisioning a few years ago that only showed up on my main user account).

Categories : Xcode

SQL export to XML. usting php script. (customer export)
You are using the concatenate operator, so it's making a long string of all your query results: $customers_id.=$row['customers_id']; You might want to put that data into an array instead: $customer['id'][$key] = $customers_id.=$row['customers_id'];

Categories : PHP

ERROR org.apache.sqoop.tool.ExportTool - Error during export: Export job failed
You seem to be having a string where a number expected like " it was not able to authenticate." (as I can see from the trace that you shared). Please check the source data that is being pushed to the database. Edit Use some other character as the delimiter. When the data is being written (I assume that a MR program is generating this data.) to HDFS, use a rare character (like ^A, #, @) as a delimiter. There are various options in the 'export' command such as '--enclosed-by', ' --escaped-by'. But your data should be prepared accordingly. The simplest option looks to be to select a delimiter character that is highly improbable to occur inside your data. Edit-2 In that case, there's nothing much any tool can do as the delimiter character is coming in between the data field without any es

Categories : Mysql

Layers on QGraphicsView?
You only need one QGraphicsScene, but the key here is that all QGraphicsItems and QGraphicsObjects can be parented. If you create a single QGraphicsItem or QGraphicsObject as a parent object, it doesn't need to draw anything, but can be used as the root for a layer's items. Therefore, subclass from QGraphicsItem to create a QGraphicsItemLayer class that doesn't render anything and add all the ellipses, polygons etc that are required in the same layer as children of that QGraphicsItemLayer. When you want to hide a layer, just hide the parent QGraphicsItemLayer object and all its children will be hidden too. -------- Edited -------------- Inherit from QGraphicsItem: - class QGraphicsItemLayer : public QGraphicsItem { public: virtual QRectF boundingRect() {

Categories : C++

CSS Layers with z-index
You can not give a child div a higher z-index than its parent. Its Relative to the parent given z-index. You need to put the div with the content out of the div with the id="page" to achieve the desired effect. But there is also a quite easier soluten. Use lightbox 2. http://lokeshdhakar.com/projects/lightbox2/

Categories : CSS

How to add symbols in layers?
Short answer, no. Long answer, I don't think you can, layers are more like grouped display order. I've been using Flash for years and have never met this need or issue. You add the mc from the code at runtime, a moment where you don't really care which layer it goes into. However, if your question is actually, how to add a mc at a specific index, then you can either addChildAt( mc, theIndexYouWant) or, simulate the layers by creating movieclips and inserting what you need inside of it. In this case, you would have, on the stage, in a single layer, the movieclips: floor, toto, layer2 and layer3. You would then add, using the code, the mc you want in the toto movieclip. If something is unclear, ask away :)

Categories : Actionscript

How add WMS layers with gwt-openlayers?
In the wmsUrl variable, you are missing the "http://", that may help. Pink tiles generally mean that the data source was not found, so this is where you should look for the problem. Try checking the wms URL you are supplying in a wms viewer (e.g. ArcGIS Explorer ). To your questions: 1)try just adding the http:// to your url, without the localhost 2)A WMS layer can have any projection, it depends solely on the projection in which it was published. Information about a specific WMS's projection should be found in metadata. 3)If the two layers have the same projection, you do not need to do anything. If you want to use two layers in different projections in one map, one of the layers must be reprojected. In pure OpenLayers, this is done by specifying the projection parameter for each laye

Categories : Google Maps

Two Image Layers and OpacityMask
The code below describes what you can do with an OpacityMask. It's a little counterintuitive, because we expect a XAML rendering to layer elements bottom-to-top. However, in this case you want your "background" image to layer on top of the foreground, because the OpacityMask will serve to display only that portion of the foreground described by the position and size of the VisualBrush, rendering the rest transparent. It's given as follows: <Grid x:Name="MainGrid" MouseMove="Grid_MouseMove"> <Rectangle Fill="Red" ></Rectangle> <Rectangle Fill="Green"> <Rectangle.OpacityMask> <VisualBrush Stretch="None" > <VisualBrush.Visual> <Ellipse Width="40" Height="40" StrokeThickness="1" Fill=

Categories : C#

custom maptype with more than one layers
A custom map type defines a DOM element for each tile, as described here. That DOM element isn't limited to just a single image. You can have a <div> with any number of images and other elements nested inside it. The hybrid map type is implemented with this approach. Here is a screenshot of the Chrome DOM inspector showing a single map tile in the hybrid satellite view: As you can see, the <div> has two <img> children. The first one, served from khms0.googleapis.com, is the base satellite tile image. The second one, served from mts0.googleapis.com, is the labels and borders overlay tile with a transparent background. This is all just a single map type as far as the Maps API is concerned: the API only knows about the container <div>, not the images inside it. Th

Categories : Javascript

Set layers in ggplot2 via loop
This problem is simple if you do the subsetting yourself: library(ggplot2) data <- data.frame( col1 = c(1, 2, 2, 3, 3, 4), col2 = c(1, 2, 2, 1, 2, 1), z = rnorm(6)) ids <- unique(data$col2) p1 <- ggplot(data, aes(col1, y = ..count..)) for(id in ids){ df <- data[data$col2 == id, ] p1 <- p1 + geom_bar(data = df, fill = "blue", alpha = 0.2) } p1

Categories : R

MVP: Passive View (with EF) and layers
Regarding the question #2, it will be better to differentiate and make some abstractions on Data Access Layer. If you continue keep it inside Presenters, that means your client will ask database each time, load some data and then make some calculations. If you are working on Client-Server application, it will be better to not mix-up the server logic and client logic. Presenters are definitely on client side, DAL on server-side. You can connect client to server with web services (ex. asmx, wcf). I see at least three huge reasons to do this: Ability to write simple unit tests on your presenter without real back-end and server logic Scale your server side if needed. You will be able to send less data to client if you make some required calculations on server side Regarding #3, with passi

Categories : C#

ASP.NET MVC, Layers, Models, Repositories etc
Views and Controllers should reside in the presentation layer. Your models should also reside in the presentation layer. Models reflect a view model that is used for presentation only. Entities should represent data and should not be sent to the View. In the presentation later, the models should be populated from the entities. You are correct in that your DbContext and UnitOfWork should be in the data layer.

Categories : Asp Net Mvc

Cocos2d-x getting data between layers
void WavePrototypeInterfaceLayer::menuAction(CCObject* pSender) { //button hit WavePrototypegameLayer* interface = (WavePrototypegameLayer*)(this->getParent()->getChildByTag(1)); //get the value from the layer }

Categories : C++

how to add a legend to a plot with two layers in R
library(ggplot2) library(reshape) melted <- melt(human[c("age1", "mean_alzheimer", "mean_other")], id.vars = "age1") p <- ggplot(data = melted, aes(x = age1, y = value, colour = variable)) + geom_point() + geom_smooth(method = "loess") Then add options to control colour, text, etc. as necessary.

Categories : R

Canvas Layers (Z Index)
Canvas does not have layers. But you can still get 1 final image with both your background and your user's scaled/rotated foreground. Since you want to let the user rotate/scale their image but you don't want to affect the background, you will need 2 canvases -- a background canvas and a user canvas. // HTML <div id="container"> <canvas id="background" class="subcanvs" width=760 height=300></canvas> <canvas id="canvas" class="subcanvs" width=760 height=300></canvas> </div> // CSS #container{ position:relative; border:1px solid blue; width:760px; height:300px; } .subcanvs{ position:absolute; } // JavaScript // a background canvas var background=document.getElementById("background"); var bkCtx=background.getContext("2d"); // a fo

Categories : Javascript

JPA with EJB with separated DAO and Service Layers
Have you seen the post of Adam Bien JPA/EJB3 KILLED THE DAO and DAOS AREN'T DEAD - BUT THEY EITHER COLLAPSED OR DISAPPEARED? In another hand, you can consider an abstract class for the service layer: public abstract class AbstractFacade<E extends Serializable, PK extends Serializable> { private final transient Class<E> entityClass; public AbstractFacade(final Class<E> entityClass) { this.entityClass = entityClass; } protected abstract EntityManager getEntityManager(); public void create(final E entity) { final EntityManager entityManager = getEntityManager(); entityManager.persist(entity); } public final E find(final PK id) { return getEntityManager().find(entityClass,

Categories : Java

Physics Objects switching layers
Don't what which of the dozen 3d libs you are using, but as an abstraction: keep all your circles in the same layer in the view, but in the code, put them in 2 separate arrays. when you switch states you perform loops on the two arrays like "all circles in this array go top and de-blur" and "all circles in his array go bottom and blur". You should learn MVC pattern to better structure your project(s). You wouldn't believe the amount of headaches you avoid with it. Pure MVC is a bit outdated but its nice. You might find a 3D MVC implementation but I doubt it adds anything to the basics.

Categories : Actionscript

Leaflet.js: How to remove multiple layers from map
According to the Leaflet API doc http://leafletjs.com/reference.html#map-removelayer, removeLayer takes an iLayer parameter: removeLayer( <ILayer> layer ) but you're passing it a String: $(this).attr("id") It looks like you do have the layer object in a variable already: mapcat52. You could save the layer objects when you create them, then look them up by id to pass to removeLayer: var layers = new Array(); // create layer mapcat52 var mapcat52 = new MyCustomLayer(latlng); // save to layers list layers["mapcat52"] = mapcat52; ... // remove layers $.each(someObj.idsChecked,function(id, val) { // look up layer object by id var layerObj = layers[val]; // remove layer map.removeLayer(layerObj); });

Categories : Javascript

Dal (with Entity Framework) and Model layers into MVC
I use a view model in my local project and the models in the other project. Then put references to the models im gonna use on the page in my view model. Then reference the view model on my page. Let me know if that sounds like something you want to do and I can edit in some code.

Categories : C#

Use entity framework models across layers?
Actually the EF model is your Business Model. EF is already handling the mapping between your DB model and your Business model (the MSL part of the EDMX or your EntityMapping classes if your into CodeFirst). As soon as you're building an MVC application, you should have a View Model. When a request hits a Contoller method, the Model returned to the View should be built by a ModelBuilder. This is up to the ModelBuilder to call your Business Service. That Service returns Business Model that the ModelBuilder will map to the right ViewModel. Have a look at this SO answer where I explain how to work with ModelBuilder.

Categories : Entity Framework

Planning Unit Tests for Layers
Should I write separate unit tests for each layer? Yes you should, as this ensures each layer works on its own what is a basic concept of unit testing is it important to isolate these tests so that they can run independently of the other layers? Yes they should be independent And what order should I write them in? The order doesn't matter, as they are independent

Categories : PHP

synchronizing layers in parallax scrolling
Use the 2 listviews with custom dynamics and then relate their speed by the distance between the images. So, where x is the speed of the foreground listview and y is the speed of the background listview, y=x*(subimage2.y-subimage1.y)*percentile.

Categories : Android

hiding method from certain layers in project
There is a separation of concerns by keepeing the User object as object that only holds data with no logic in it. you better keep it separated for the following reasons: As you stated, it is a bad practice since the Save' functionality will be exposed to other places/classes where it is irrelevant for them (This is an important for programming generally). Modifying the service layer - I guess you are using WCF web service as you can transfer a .NET object (c#/VB) to the service via SOAP. If you put the saving logic in the 'User' object, you can't replace it another webservice that receives a simple textual data structures like JSON or XML or simply doesn't support .NET objects. Modifying the data storage layer - If you want, for example, to store the data inside a different place like ot

Categories : Asp Net

What is the best way to use layers and partial rendering in iOS for speed
I'd have a CGLayerRef that was used for drawing the path into. For each new point I'd draw just the new segment. When the graph got to full width I'd create a new CGLayerRef and start drawing the new line segments into that. What happens to the previous layer as it's drawn over by the new layer depends on how your graph is displayed, but you could clear the section which is now underneath the new layer (using CGContextSetBlendMode(context, kCGBlendModeClear);) or you could choose to blend them together in some other way. Drawing the layers each time you make a change to the lines they contain is relatively cheap compared to drawing all of the line segments themselves. Technically, there would also be CALayers used to manage the drawing of the CGLayerRefs to the screen (via the delegate

Categories : IOS



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.