size

Reducing PDF file size using Ghostscript on Linux didn't work

前提是你 提交于 2019-11-28 04:25:32
I have about 50-60 pdf files (images) that are 1.5MB large each. Now I don't want to have such large pdf files in my thesis as that would make downloading, reading and printing a pain in the rear. So I tried using ghostscript to do the following: gs \ -dNOPAUSE -dBATCH \ -sDEVICE=pdfwrite \ -dCompatibilityLevel=1.4 \ -dPDFSETTINGS="/screen" \ -sOutputFile=output.pdf \ L_2lambda_max_1wl_E0_1_zg.pdf However, now my 1.4MB pdf is 1.5MB large. What did I do wrong? Is there some way I can check the resolution of the pdf file? I just need 300dpi images, so would anyone suggest using convert to change

Is there a size limit for HTML5 Manifest?

旧巷老猫 提交于 2019-11-28 04:09:34
问题 I have been looking into HTML5 manifest but I am unclear as to whether or not there is file size limit for caching using the manifest. For example if i wanted to make several audio files available offline would this be achieved using manifest? or is it really only for small images and text? 回答1: as far as i know the spec doesn't specify a maximum size for an object or for the entire cache, but e.g. firefox has a preference which by default allows a total of 50mb worth of cache-files. that

剑指offer

冷暖自知 提交于 2019-11-28 03:46:13
一、 组类型”第1题——二维数组中的查找 1. 思路: 缩小范围 2. 方法: (1)要查找的数字等于数组中的数字,结束查找过程; (2)要查找的数字小于数组中的数字,去除该数字右边的数字,在剩下的数字里查找; (3)要查找的数字大于数组中的数字,去除该数字上边的数字,在剩下的数字里查找。 3. 图例 ​ 4. C++实现 #include <iostream> #include <vector> using namespace std; class Solution { public://类、公有成员、成员函数 bool Find(int target, vector<vector<int>> array) {//用vector类声明了一个二维数组对象array int lrow = array.size();//.表示对象的成员运算符,array.size()表示的是array的行数 int lcol = array[0].size();//array[0].size()表示的是第一行的列数 if (!array.empty() && rows>0 && cols>0) { int row = 0; int col = lcol - 1; while (row<lrow && col >= 0) { if (array[row][col] == target) { cout <

accessing UIImage properties without loading in memory the image

旧街凉风 提交于 2019-11-28 03:43:19
As you know the iphone guidelines discourage loading uiimages that are greater than 1024x1024. The size of the images that i would have to load varies, and i would like to check the size of the image i am about to load; however using the .size property of uiimage requires the image to be laoded... which is exactly what i am trying to avoid. Is there something wrong in my reasoning or is there a solution to that? thank you all Ole Begemann As of iOS 4.0, the iOS SDK includes the CGImageSource... functions (in the ImageIO framework). It's a very flexible API to query metadata without loading the

Pyqt how to get a widget's dimensions

时光毁灭记忆、已成空白 提交于 2019-11-28 03:03:19
问题 I am currently developing an application in which i cannot use modal windows (due to some application constraints). However, in some cases i would like to simulate a popup window. To do so i dynamically create a widget that has the centralwidget as parent and i use the move() method to place it where i want. I would like to know if there is a way to get a widget's dimensions at a given time (considering the mainWindow can be resized at any time) so that i will be able to center the

How to find the size of a class in C#

混江龙づ霸主 提交于 2019-11-28 02:41:49
问题 public class A { int x; float y; } How to find the size of the class in C#. Is there any operator like Sizeof(), which used to be in C++ 回答1: Short answer: You dont. Long answer: You can only do that if you type has a fixed layout and has no managed members. Structs are fixed by default. Classes can attributed to have a fixed layout. (I am not showing how, as you really do not need it. It is only important when doing interop.) 回答2: The following would give you the size of the C# class:

Size of char pointer array from function

谁说胖子不能爱 提交于 2019-11-28 02:23:50
问题 Using this code: #include <stdio.h> void printSize(char *messages[]) { printf("%d", sizeof(messages) / sizeof(char *)); } int main(void) { printf("Size when through passing direct to function: "); printSize((char *[]){"Zero", "One", "Two", "Three"}); printf("\n"); printf("Size when calculating in main: %d\n", sizeof((char *[]){"Zero", "One", "Two", "Three"}) / sizeof(char *)); return 1; } I get output: Size when through passing direct to function: 1 Size when calculating in main: 4 I

Can a window be resized past the screen size/offscreen?

给你一囗甜甜゛ 提交于 2019-11-28 02:03:27
My purpose is to size a window to a width/height greater than the size of my physical screen programmatically under Win32. How can I do this? On my systems it seems the maximum size of a given window is bound by the size of my screen whether programmatically or whether sizing manually by dragging the sizing cursor. I have tried programmatically with SetWindowPos() and MoveWindow() and both cap the size of the target window. Oddly I know some people do not have this 'cap' so I wonder whether this is perhaps due to some OS setting (registry). Does anyone know something about this? Or perhaps

Resize your image according to screen sizes?

瘦欲@ 提交于 2019-11-28 01:52:16
问题 I noticed that whenever I tested my app on my Droid X and Droid Bionic, the images where actually fine. But whenever I tested it on Larger devices such as Android Tablet. The image is kinda stretched. I also have a question about the information below, I tried to make 4 copies of "my_layout.xml" and store it in "layout,layout-small,layout-xlarge,layout-xlarge-land" folders. Each of them contain different sizes of the image. That one did the work, they all look good in any sizes of screen

Is there an easy way to tell if a class/struct has no data members?

不羁的心 提交于 2019-11-28 01:48:47
Hallo, is there some easy way in C++ to tell (in compile-time) if a class/struct has no data members? E.g. struct T{}; My first thought was to compare sizeof(T)==0 , but this always seems to be at least 1. The obvious answer would be to just look at the code, but I would like to switch on this. Konrad Rudolph Since C++11, you can use standard std::is_empty trait: https://en.cppreference.com/w/cpp/types/is_empty If you are on paleo-compiler diet, there is a trick: you can derive from this class in another empty and check whether sizeof(OtherClass) == 1 . Boost does this in its is_empty type