w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Why does the default MVC 4 project include minified files?
If you run in debug mode, the .debug.js files are included. If you run in release mode, the .min.js files are included. If the file is not .debug.js or .min.js, it's included in both cases. In release mode, all the files, are minified and bundled in one file. No matter if they were or not were previously bundled. I usually have the original, not .min.js or .debug.js files, and let the bundler do all the job of minification. There is also another important thing you must be aware of: the bundler will reorder the included files according to internal rules. And, if you use wildcards, the files are included alfabetically. This can make fail your scripts if there are dependencies and they are included in the worng order. You can run your site in debug mode to check the order (look at the ren

Categories : Asp Net Mvc

Force SquishIt to refresh/recreate minified files
It should - we are adding cache dependencies for source files (not the generated ones) so if one of them is edited the entry in the bundle cache should be invalidated. See BundleCache.Add No - once an entry is in the bundle cache we assume the output file will be there, so you'd end up with the file not being found. This is by design, we haven't really heard a compelling case against it. Deleting generated files when deploying should be fine though, even if not strictly necessary - don't you need to restart the app then anyway? If you are really concerned about files lingering you may want to consider using SquishIt without the file system

Categories : Asp Net Mvc

How to read the information in configuration files(.properties) in JavaScript?
It is not advisable to read configuration files from JavaScript. Instead you could do this: Read the file on server-side (using PHP, .Net or Python or any other language that you prefer) Render the valid values to JavaScript. Something like: var maxTime = "<?php echo maxTime; ?>"; var upVotePostMaxTime = "<?php echo upVotePostMaxTime; ?>"; where <?php echo maxTime; ?> and <?php echo upVotePostMaxTime; ?> will have values 60 each. This would show on the client-side as: var maxTime = "60"; var upVotePostMaxTime = "60"; and then you may use it in JavaScript. Values are assigned in double quotes to prevent breaking of JavaScript code in case null values are sent from the server. Please ensure that proper values are assigned to JavaScript variables.

Categories : Javascript

Is it possible to override minified JavaScript functions
Minification does not change the "visible" API. If you can call a function as library.functionName(...) on the minified library, then you can override that property and turn it into something else (note that a function is just a property called with the execution operator () added to it). With one caveat: if that function was set up using Object.defineProperty, with either default configurable and/or writable configuration options (or these values explicitly set to false), then it will be "locked" from being modified (it will not be deletable and/or assignable, respectively).

Categories : Javascript

Is there a un-minified JavaScript version of the FireBase API?
The protocol that Firebase uses to communicate with its client libraries is not a documented API. You might be able to reverse engineer it, but since it's not a documented API, it could change at any time. You may want to investigate Firebase's REST Streaming, which allows you to listen for changes to a location. Here's an example of what the server could send, per the docs: // Set your entire cache to {"a": 1, "b": 2} event: put data: {"path": "/", "data": {"a": 1, "b": 2}} // Put the new data in your cache under the key 'c', so that the complete cache now looks like: // {"a": 1, "b": 2, "c": {"foo": true, "bar": false}} event: put data: {"path": "/c", "data": {"foo": true, "bar": false}} Also, the Firebase client that @Anant mentions in his comment is a deprecated version that's very

Categories : Lua

IIS Url Rewrite: how to ignore minified javascript and css
You can create a ignore rule, match URLs to ignore <rule name="Ignore" enabled="true" stopProcessing="true"> <match url="^(images|css|bundles).*"/> <conditions logicalGrouping="MatchAll" trackAllCaptures="false"/> <action type="None"/> </rule>

Categories : Iis

How to develop Javascript and CSS and use minified versions when releasing?
I would maintain your codebase only uncompressed and use ant (http://ant.apache.org/) or something similar to create a build process which runs your tests, maybe runs jslint over your code, and then minifies it and copies it into a structure that is ready to be released. The build could name the files as required so you dont have to worry about the minified filenames being different.

Categories : Javascript

Debugging in-page javascript with Chrome when the html is minified?
One thing that might help is that you can set breakpoints in chrome w/o using the debugger directive directly in code. Simply view the prettified code output in the chrome sources tab, and then double click on the line where you want to add a breakpoint.

Categories : Javascript

VBA to Copy Information From a Folder of Files and Compile Information to a Single Workbook
This is not the full code, but it should help you. When you work with multiple workbooks keep track of them. For example start with: Dim CurrWB As Workbook Set CurrWB = ActiveWorkbook Then in the cycle: Dim WB As Workbook For Each StrFile In var Set WB = Workbooks.Open(loc & StrFile) ... WB.Close Next StrFile Inside the cycle you can find the area to copy doing something like: R1 = 1 Do While WB.Sheets("Sheet name").Cells(R, 2) <> "Starting text" R1 = R1 + 1 Loop R2 = R1 + 1 Do While WB.Sheets("Sheet name").Cells(R2, 2) <> "Ending text" R = R + 1 Loop For R = R1 to R2 CurrWB.Sheets("Report").Cells(RReport, 3) = WB.Sheets("Report").Cells(R, 3) RReport = RReport + 1 Next R

Categories : Excel

copyright file in deb package - how to
if you build a package using low-level tools like dpkg-deb you should have a good knowledge on the internals of a debian package. the DEBIAN/-folder is really only for control files, e.g. the control description file of the package, and various pre/post installation scripts (e.g. postinst). otoh, the usual way to build packages is using high-level tools, namely dpkg-buildpackage, which uses a debian/ directory, which has a similar name to DEBIAN/ but is really something completely different (note the upper/lower case spelling). dpkg-buildpackage (or rather it's underlying tools like debhelper or cdbs or whatever you choose) will install the debian/changelog file into /usr/share/doc/<packagename>/. if you insist on using low-level tools, then you must not put your changelog into DE

Categories : Ubuntu

Converting Symbols (Copyright, Reg etc)
The problem that the entity doesn't decode when using html_entity_decode is likely that the target character set given to html_entity_decode is still the default ISO-8859-1. ISO-8859-1 cannot encode "Ⓡ" (the CIRCLED LETTER R), but it can encode "®" (the REGISTERED MARK). So, first, to decode it correctly: html_entity_decode('&#9415;', ENT_COMPAT, 'UTF-8') But secondly, "Ⓡ" and "®" are not the same character, and you probably don't want "Ⓡ".

Categories : PHP

Specify copyright and author in Django translation (.po) file
The django translations normally does a merging on makemessages. So, if you change the header, it will keep the header you added. This behavior is consistent, e.g. if you change a string on your code, the .po will keep the translation of the original string, so that nothing is lost in makemessage.

Categories : Python

How to insert a Symbol (Pound, Euro, Copyright) into a Textbox
I cant believe this was difficult to find on the internet! For future developers,if you have the unicode character its easy to do. eg: C#: var selectionIndex = txt.SelectionStart; string copyrightUnicode = "00A9"; int value = int.Parse(copyrightUnicode, System.Globalization.NumberStyles.HexNumber); string symbol = char.ConvertFromUtf32(value).ToString(); txt.Text = txt.Text.Insert(selectionIndex, symbol); txt.SelectionStart = selectionIndex + symbol.Length; VB.Net Dim selectionIndex = txt.SelectionStart Dim copyrightUnicode As String = "00A9" Dim value As Integer = Integer.Parse(copyrightUnicode, System.Globalization.NumberStyles.HexNumber) Dim symbol As String = Char.ConvertFromUtf32(value).ToString() txt.Text = txt.Text.Insert(selectionIndex, symbol) txt.SelectionStart = selec

Categories : C#

.NET XMLDocument Saving Copyright Symbol Differently Than It Reads It
See XmlDocument.Save Method(TextWriter). Create a TextWriter with the correct encoding, and use that instead of just passing the file name. Dim xmldoc As New XmlDocument() xmldoc.LoadXml("base.xml") Dim filename As String = Me.GetType().Name & "-" & TestContext.TestName & ".xfdl" Console.WriteLine("Saving file: " & IO.Path.Combine(TestContext.TestDeploymentDir, filename)) Using writer As TextWriter = New StreamWriter(fileName, correctEncoding) xmldoc.Save(writer) End Using

Categories : Dotnet

Insert or replace Copyright Policy in every page on VS-2010
It shouldn't take long to write another quick program in C# to read in your source files and replace the comment. Or if you're lucky enough to use Resharper, it has a code cleanup feature that can add or update headers in source files.

Categories : Visual Studio 2010

Photoshop saves copyright symbol as UTF-8 (unescaped) in metadata
You need to find out which encoding the JPEG data uses. If Photoshop doesn't use that encoding, it is buggy and you should claim your money back (and use a free alternative, which is better anyway). If your code needs to handle broken JPEG metadata (e.g. coming from a broken Photoshop), you will have to guess the encoding (maybe Latin-1 or Latin-15) and transcode that accordingly. Now, assuming you now know the encoding, you can transcode the bytes to UTF-8 (which is a Unicode encoding) for use within PHP. Note that PHP doesn't support Unicode specifically, it still uses byte strings, so anything outside the ASCII range will use more than one character. Keep that in mind when indexing into such a string. The question this also poses is what you mean with "unicode to UTF8", because UTF-8 i

Categories : PHP

How to read information from .xml files
Please follow this tutorial to parse XML data. The tutorial reads the data from a file inside the sdcard of the device. You can place your XML file in the sdcard or raw folder of the project. If the XML file is in the raw folder of the project then you have to get the InputSource like this InputSource is = new InputSource(getResources().openRawResource(R.raw.yourxmlfile)); and document should read the file from byteStream Document doc=db.parse(new InputSource(is.getByteStream()));

Categories : Android

while loop not outputting all information from two files
You are using the same string for both StreamReader. Declare a second string "line2" to read from the second StreamReader "input2". Note : You should declare your variables like that: String line = string.Empty; The way you are doing it does not initialize the variable. Simply good practices.

Categories : C#

unix command svn log to get just the files information
How about: what ever process you are running | awk -v FS="[/ ]" '$1~/^[AMD]$/{print $(NF-1)"/"$NF}' Test: [jaypal:~/Temp] cat svn.log svn log -v http://test/svn/Demo/branches/HelloWorld/Batch/ --limit 2 ------------------------------------------------------------------------ r133 | testuser1 | 2013-04-02 18:22:28 -0400 (Tue, 02 Apr 2013) | 3 lines Changed paths: M /branches/HelloWorld/Batch/test.java DEMO-13 Testing to lock ------------------------------------------------------------------------ r132 | testuser2 | 2013-04-02 18:20:40 -0400 (Tue, 02 Apr 2013) | 3 lines Changed paths: M /branches/HelloWorld/Batch/test.java DEMO-1 Testing to lock [jaypal:~/Temp] awk -v FS="[/ ]" '$1~/^[AMD]$/{print $(NF-1)"/"$NF}' svn.log Batch/test.java Batch/test.java

Categories : Svn

Extracting unrecognized information from many CSV files
Your data format was a little hard to make sense of (is the actual data tab-separated?) so I've turned it into a somewhat simpler example: Name bunch of stuff header stuff stuff header stuff stuff header stuff stuff header stuff stuff header stuff stuff Count 5 NUMBER,ITEM N1,Shoe N2,Heel N3,Tee N4,Polo N5,Sneaker You can read in a csv file like this using pandas, skipping the header with skiprows: import pandas as pd prod_df = pd.read_csv('prod.csv', skiprows=7) Then you can find which values are in your data (note that the unique() call means you'll only get each value once, ev

Categories : Python

Extracting debugging information from core files
There are a few things like this. Mostly they are incomplete relative to gdb -- for example it is uncommon for backtracers to print information about function arguments or locals, but gdb can do this. Also gdb can often unwind in cases where other unwinders choke. Anyway, one I know of is elfutils. https://fedorahosted.org/elfutils/. It has an unwinder in development (not sure if it is in or yet, check git). There's also libbacktrace. It is part of gcc and is designed for in-process unwinding. However, it could perhaps be adapted to core files. There's also libunwind. I hear it is kind of terrible but YMMV. One thing to note is that many of these require debuginfo to be available. One last thought -- there has been a lot of work in the "catch a trace" area from the ABRT folks.

Categories : Linux

Best way to merge multiple files without duplicating information
You could just add the arrays and then .uniq on them perhaps? 1.9.3-p429 :001 > a = ['test', 'test2'] + ['test2', 'test3'] [ [0] "test", [1] "test2", [2] "test2", [3] "test3" ] 1.9.3-p429 :002 > a.uniq [ [0] "test", [1] "test2", [2] "test3" ] Of course, this would rely on the lines being exactly identical.

Categories : Ruby

Retrieve database information from DBML files
Short answer is no. If you have database backups you can restore these and get the details from there. If you don’t have these but your database was in full recovery mode you can try to examine transaction log and see if you can get any info from there. See this for more details SQL Server Transaction Log Explorer/Analyzer

Categories : Sql Server

How to parse and store team information from files into classes?
This is a really really common (and luckily for you, simple) case of parsing using tokenizing. Here, the different fields you need are separated by the same character: , Please see this stackoverflow question about tokenizing in C++ for more information. Also, don't forget to remove unnecessary spaces on your tokenized elements (except the first one)

Categories : C++

How can I remove all versioning information from shared object files?
Yes, you can disable it by adding -avoid-version to <your library>_LDFLAGS as described here: GNU Autotools: rebuild without version info

Categories : Android

Date and Size information of files and folders just in one window available
I found it. select the window in which you miss the information go to show and select Full It is quite easy, if you know how to do.

Categories : Misc

Change display information (like name) of files from a shell extension for explorer.exe
After extensive research, I've found that the best way to do it is to write a Shell Namespace extension. I'll be able to provide a virtual directory representing my server's structure, and translate the names the way I want. This seems a little overkill though, but there's no other way to change the informations displayed as the display name is managed by an IShellFolder which provides it to an IShellView One excellent source of informations I've found about it, and the most up to date so far, is an article on Michael Edenfiled's blog

Categories : C#

Linux find everything that is minified?
Something like this should work: find . ( -iname "*.js" -or -iname "*.css" ) -not -iname "*.min.js" -not -iname "*.min.css" | grep -v '^./bootstrap' You can also do it with find's -prune flag, but I think the syntax is way more convoluted than a simple grep. Also note that I'm using -iname instead of -name - this makes the strings case-insensitive, which is usually what I do, in case my source tree has files from Windows in it, but feel free to use whichever suits your situation better.

Categories : Regex

Is it possible to get un-minified source for redquerybuilder?
I'm afraid it is free but closed source software at the moment. We are trying to understand what level of interest there is before thinking about licences and tidying up the code. Any particular features you need? Either way we definitely want to allow people to customise without changing the core code. Update 19/8/2013 - Now open source under the EPL licence https://github.com/salk31/RedQueryBuilder

Categories : Misc

Is html sent compressed and/or minified?
I'm wondering if the browser already streamlines the process behind the scenes The browser can't control how much data the server sends in its response. or should I minify and/or compress the html before calling .load() from jQuery? You call load on the client. The server has to do any minification or compression of the HTML. Is there a standard way to perform minification and/or compressing in this scenario? Compression is usually handled by gzip encoding. How you set that up depends on your server and/or the server side programming language that is generating the content. I'm not aware of any standard way to perform minification. I used HTML Tidy to do that once.

Categories : HTML

Copy files while preserving original file information (creation time etc.)
Robocopy via system2() can keep the timestamps. > cmdArgs<- paste( normalizePath( file.path(getwd()), winslash="/"), normalizePath( file.path(getwd(), "bkup"), winslash="/" ), "*.txt", "/copy:DAT /V" ) > system2( "robocopy.exe", args=cmdArgs ) Robocopy has a slew of switches for all different types of use cases and can accept a 'job' file for the params and file names. The ability of R to call out using system could also be used to execute an elevated session (perhaps the easiest would be by using a powershell script to call Robocopy) so that all of the auditing info (permissions and such) could be retained as well.

Categories : R

Run tests on sources and then on their minified version
our approach is as follows. We use the testing suite that comes with closure, we write our tests as per normal and then we use goog.exportSymbol to get the tests working with advanced compilation via "reflection" example: product.path.SomethingRegressionTest.prototype.placeInvalidSession = function() { ... } goog.exportSymbol('test_placeInvalidSession', function() { core.inject(product.path.SomethingRegressionTest).placeInvalidSession(); }); We use injection here, and in the teardown we destroy all injected instances, but there are a few approaches you could use.

Categories : Javascript

Update text content with minified.js
You can use the fill method to replace the existing text value. $('.myRef').fill("New Text Value"); or you can use the add method to append text to the existing text. $('.myRef').add("Append Text"); (The text method returns the concatenated text content of all nodes in the list.) This list of How To's is helpful for learning how to use minifiedjs.

Categories : Javascript

Recursively search files for information contained in excel cell and return path
From my limited experience, it seems you'd want to perform 4 tasks. 1) Loop through Directories 2) Loop through files per directory (Good idea to keep the filename in a variable) 3) Test the text file for values. Would suggest clear a "scribble sheet", import the file, run a check. e.g. Sheets("YourScratchPatch").Select Application.CutCopyMode = False With ActiveSheet.QueryTables.Add(Connection:="TEXT;" & yourpath & yourfile.txt, Destination:=Range("A1")) .FieldNames = True .RowNumbers = False .FillAdjacentFormulas = False .PreserveFormatting = True .RefreshOnFileOpen = False .RefreshStyle = xlInsertDeleteCells .SavePassword = False .SaveData = True .RefreshPeriod = 0 .TextFilePromptOnRefresh = False .TextFilePlatform = 850 .

Categories : Excel

Get information about the Visitor (Javascript / PHP)
If you would like to Geo Locate your visitors, and discover their physical location based off their IP, MaxMind has a great service with a free option. http://www.maxmind.com/en/geolocation_landing

Categories : PHP

Send information from the WCF to JavaScript
SignalR is a good way to do it, you can see this in detail in the following question: Use SignalR to notify from wcf to JS

Categories : Javascript

Add extra info (copyright notice/read more link) to copied text and preserve formatting (line breaks and color)
You somehow missed a few quotes, believing this or this, is where it came from. Guess it works as you intend, after following corrections (Working Demo): function addLink() { var body_element = document.getElementsByTagName("body")[0]; var selection = window.getSelection(); var pagelink = '< br/> < br/> Mai multe Bancuri pe: http://bancuricubarbatisifemei.blogspot.com/ <br/>'; var copytext = selection + pagelink; var newdiv = document.createElement('div'); newdiv.style.position = 'absolute'; newdiv.style.left = '-99999px'; body_element.appendChild(newdiv); newdiv.innerHTML = copytext; selection.selectAllChildren(newdiv); window.setTimeout(function () { body_element.remo

Categories : Javascript

Minified JS only works by pasting source into Controller
angularjs provides jQuery functionality via the angular.element function (http://docs.angularjs.org/api/angular.element), so you should use it instead of $ (however, I cannot explain why $ isn't working in your case)

Categories : Javascript

JQuery 1.9.0 minified can't select the text or value from a dropdown list?
You're selecting your select by id but it has only a name. Change $("#formulas option:selected") to $("select[name=formulas] option:selected") Or, better, give it also an id : <select id=formulas name="formulas">

Categories : Javascript

Look for in Mysql table and pass information from the javascript
What you are doing now is pretty much the standard. If you dont want to use this method then I suggest that you look into session. On your first page you will need to include the line: <?php session_start(); then your normal code. Once you have read the information from the database then place the values into session variables; $_SESSSION['var1'] = $result['id']; //--- continue for all the values you want to save On the second page you will need to do the reverse <?php session_start(); $id = $_SESSION['var1'];

Categories : PHP



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